diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-10 11:35:17 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-10 12:28:20 +0100 |
commit | 97a50593fe86456a72762ba4a768614de23c3f14 (patch) | |
tree | 066a7c1be77fc162e4de73e95f4a32a6829e27f2 /source3 | |
parent | 4803cc5d3ce7db872bd21f6a1232f7cabc46186e (diff) | |
download | samba-97a50593fe86456a72762ba4a768614de23c3f14.tar.gz samba-97a50593fe86456a72762ba4a768614de23c3f14.tar.bz2 samba-97a50593fe86456a72762ba4a768614de23c3f14.zip |
talloc_free_children can only reset pool if it's empty
(This used to be commit 0272b46515b4c4515d5cad8e86fab61d8e91e29e)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/talloc/talloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/talloc/talloc.c b/source3/lib/talloc/talloc.c index ea4480286e..8683e361a6 100644 --- a/source3/lib/talloc/talloc.c +++ b/source3/lib/talloc/talloc.c @@ -866,7 +866,8 @@ void talloc_free_children(void *ptr) } } - if (tc->flags & TALLOC_FLAG_POOL) { + if ((tc->flags & TALLOC_FLAG_POOL) + && (*talloc_pool_objectcount(tc) == 1)) { tc->pool = ((char *)tc + TC_HDR_SIZE + TALLOC_POOL_HDR_SIZE); #if defined(DEVELOPER) && defined(VALGRIND_MAKE_MEM_NOACCESS) VALGRIND_MAKE_MEM_NOACCESS( |