1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

talloc_free_children can only reset pool if it's empty

This commit is contained in:
Volker Lendecke 2008-01-10 11:35:17 +01:00 committed by Michael Adam
parent 6deca23b6c
commit 5cc7a638e9

View File

@ -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(