The Samba-Bugzilla – Attachment 12070 Details for
Bug 11901
Reparenting in a destructor incorrectly terminates freeing of children leading to a memory leak.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
0001-lib-talloc.-Fix-memory-leak-when-destructors-reparen.patch (text/plain), 1.02 KB, created by
Jeremy Allison
on 2016-05-05 00:19:00 UTC
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-05-05 00:19:00 UTC
Size:
1.02 KB
patch
obsolete
>From 7b5913b6334eb8d36ccbe258d323bb9921571202 Mon Sep 17 00:00:00 2001 >From: Saji VR <saji.vr@nutanix.com> >Date: Wed, 4 May 2016 15:14:55 -0700 >Subject: [PATCH] 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> >--- > lib/talloc/talloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c >index 90b9d96..48d2033 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); >-- >2.8.0.rc3.226.g39d4020 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11901
:
12070
|
12075
|
12080