Possible memory leak in loadparm.

Andreas Schneider asn at samba.org
Wed Feb 3 07:03:35 UTC 2016

On Tuesday 02 February 2016 19:38:57 Hemanth Thummala wrote:
> Hi folks,
> We are using samba 4.3 stack. We ran into some kind of memory leak issues
> recently. To detect those leaks, we have run samba under valgrind. We were
> able to detect and fix one of the leaks specific to us(not in samba).
> talloc_free_children(ServicePtrs[idx]) is used in free_service_byindex().
> According to its documentation, talloc_free_children() will only cleanup
> its child contexts and not the actual one.
> Instead of using NULL we can use "ServicePtrs” as context for allocating
> individual records. Valgrind is happy after these changes. No leak reports
> are seen now.

Hi Hemanth,

thanks for your contributions. The patch looks good for me. Could you please 
open a bug for it and then add:

BUG: <bugzilla url>

to the commit message. See the git history for examples. We want to backport 
this to older version and require a bug for that.

Best regards,

	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org

More information about the samba-technical mailing list