From 92786aebf1b8aa17612ebaf5dd0ee8cd4abf9616 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 19 Sep 2009 08:23:03 -0700 Subject: s4-resolve: fixed a crash bug on timeout We were creating the name resolution context as a child of lp_ctx, which meant when we gave up on a connection the timer on name resolution kept running, and when it timed out the callback crashed as the socket was already removed. --- source4/lib/socket/connect_multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/socket') diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c index 8fcfc0a8ea..68386ba565 100644 --- a/source4/lib/socket/connect_multi.c +++ b/source4/lib/socket/connect_multi.c @@ -103,7 +103,7 @@ _PUBLIC_ struct composite_context *socket_connect_multi_send( struct nbt_name name; struct composite_context *creq; make_nbt_name_server(&name, server_address); - creq = resolve_name_send(resolve_ctx, &name, result->event_ctx); + creq = resolve_name_send(resolve_ctx, multi, &name, result->event_ctx); if (composite_nomem(creq, result)) goto failed; composite_continue(result, creq, continue_resolve_name, result); return result; -- cgit