svn commit: samba r4915 - in branches/SAMBA_4_0/source/libcli/nbt: .

tridge at samba.org tridge at samba.org
Fri Jan 21 23:53:10 GMT 2005


Author: tridge
Date: 2005-01-21 23:53:10 +0000 (Fri, 21 Jan 2005)
New Revision: 4915

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4915

Log:
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)

Modified:
   branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c	2005-01-21 23:15:18 UTC (rev 4914)
+++ branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c	2005-01-21 23:53:10 UTC (rev 4915)
@@ -122,10 +122,10 @@
 	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;
 }
 



More information about the samba-cvs mailing list