r4915: free temp context _before_ the async callback, as the async callback might...
authorAndrew Tridgell <tridge@samba.org>
Fri, 21 Jan 2005 23:53:10 +0000 (23:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:05 +0000 (13:09 -0500)
leaving the tmp context freed (so a double free)
(This used to be commit b20c0561b8ec3ec7010f846be7a39165783e15c2)

source4/libcli/nbt/nbtsocket.c

index b0248b6de0f39e88f436eaa0d2e269dc46d73305..664e6fdce0b8d3538a80e8b644026a018f2b5b47 100644 (file)
@@ -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;
 }