diff options
author | Saji VR <saji.vr@nutanix.com> | 2016-05-04 15:14:55 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-05-05 08:33:53 +0200 |
commit | d4d14b15b6734e99f8527136ec007a97024ac348 (patch) | |
tree | e4b80fa379cdc1372ab6ec6d03c6fcdbe8023c82 /lib/talloc | |
parent | 2fe2e662dba080536a0f6c5485514097dd74a65a (diff) | |
download | samba-d4d14b15b6734e99f8527136ec007a97024ac348.tar.gz |
lib:talloc. Fix memory leak when destructors reparent children.
If a destructor reparents a child, we shouldn't exit the
loop freeing children as there may be others to process.
https://bugzilla.samba.org/show_bug.cgi?id=11901
Signed-off-by: Saji VR <saji.vr@nutanix.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 5 08:33:53 CEST 2016 on sn-devel-144
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 90b9d963ca9..48d2033eba7 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -1528,7 +1528,7 @@ static inline void _talloc_free_children_internal(struct talloc_chunk *tc, * Destructor already reparented this child. * No further reparenting needed. */ - return; + continue; } if (new_parent == null_context) { struct talloc_chunk *p = talloc_parent_chunk(ptr); |