[PATCH] Possible memory leak in loadparm.

Hemanth Thummala hemanth.thummala at nutanix.com
Wed Feb 3 18:53:45 UTC 2016


Hi Andreas,

Thanks for reviewing the changes. 
I have created a bug and included the details in the patch now.



Thanks,
Hemanth.

On 2/2/16, 11:03 PM, "Andreas Schneider" <asn at samba.org> wrote:

>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
>www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-loadparm-Fix-memory-leak-issue.patch
Type: application/octet-stream
Size: 991 bytes
Desc: 0001-loadparm-Fix-memory-leak-issue.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160203/9980221a/0001-loadparm-Fix-memory-leak-issue.obj>


More information about the samba-technical mailing list