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/libcli/smb_composite/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb_composite') diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index 9a19771bc0..3d35018acb 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -480,7 +480,7 @@ struct composite_context *smb_composite_connect_send(struct smb_composite_connec state->stage = CONNECT_RESOLVE; make_nbt_name_server(&name, io->in.dest_host); - state->creq = resolve_name_send(resolve_ctx, &name, c->event_ctx); + state->creq = resolve_name_send(resolve_ctx, state, &name, c->event_ctx); if (state->creq == NULL) goto failed; state->creq->async.private_data = c; -- cgit