From 79ef4f216bbf26db69560acffa8d075ac704d654 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 23:53:10 +0000 Subject: r4915: free temp context _before_ the async callback, as the async callback might destroy our top level context leaving the tmp context freed (so a double free) (This used to be commit b20c0561b8ec3ec7010f846be7a39165783e15c2) --- source4/libcli/nbt/nbtsocket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/nbt/nbtsocket.c') diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index b0248b6de0..664e6fdce0 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -122,10 +122,10 @@ failed: nbt_name_request_destructor(req); req->status = status; req->state = NBT_REQUEST_ERROR; + talloc_free(tmp_ctx); if (req->async.fn) { req->async.fn(req); } - talloc_free(tmp_ctx); return; } -- cgit