summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-23 04:36:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:29 -0500
commit0db0de619070c171dacdf40022011abad8a73cbc (patch)
treec5ad1914799a81124dff49c1d722914591143779 /source4/lib
parent03e7d374616c4b0be3e9d62e5925ffb054b20642 (diff)
downloadsamba-0db0de619070c171dacdf40022011abad8a73cbc.tar.gz
samba-0db0de619070c171dacdf40022011abad8a73cbc.tar.bz2
samba-0db0de619070c171dacdf40022011abad8a73cbc.zip
r15828: a talloc steal optimisation spotted by metze
(This used to be commit e00ff9f35eed28aeecdc779cee06b87c34d82124)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/talloc/talloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index 823ae4ffb3..67478fc9d4 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -698,7 +698,7 @@ void *talloc_steal(const void *new_ctx, const void *ptr)
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);
}