svn commit: samba r15828 - in branches/SAMBA_4_0/source/lib/talloc: .

tridge at samba.org tridge at samba.org
Tue May 23 04:36:29 GMT 2006


Author: tridge
Date: 2006-05-23 04:36:28 +0000 (Tue, 23 May 2006)
New Revision: 15828

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

Log:

a talloc steal optimisation spotted by metze

Modified:
   branches/SAMBA_4_0/source/lib/talloc/talloc.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-05-23 03:53:36 UTC (rev 15827)
+++ branches/SAMBA_4_0/source/lib/talloc/talloc.c	2006-05-23 04:36:28 UTC (rev 15828)
@@ -698,7 +698,7 @@
 
 	new_tc = talloc_chunk_from_ptr(new_ctx);
 
-	if (tc == new_tc) {
+	if (tc == new_tc || tc->parent == new_tc) {
 		return discard_const_p(void, ptr);
 	}
 



More information about the samba-cvs mailing list