Bug 14339 - Memory leak in lpcfg_load_internal()
Summary: Memory leak in lpcfg_load_internal()
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.12.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-06 21:21 UTC by Andrew Walker
Modified: 2021-03-19 00:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2020-04-06 21:21:04 UTC
Noticed the following while experimenting with python bindings:

>>> import talloc
>>> from samba.samba3 import param
>>> lp_ctx = param.get_context()
>>> lp_ctx.load_default()
>>> talloc.report_full(lp_ctx)
full talloc report on 'struct loadparm_context' (total    121 bytes in   2 blocks)
    /usr/local/etc/smb4.conf       contains     25 bytes in   1 blocks (ref 0) 0x800a38660
>>> lp_ctx.load_default()
>>> talloc.report_full(lp_ctx)
full talloc report on 'struct loadparm_context' (total    146 bytes in   3 blocks)
    /usr/local/etc/smb4.conf       contains     25 bytes in   1 blocks (ref 0) 0x800a389e0
    /usr/local/etc/smb4.conf       contains     25 bytes in   1 blocks (ref 0) 0x800a38660


MR for proposed fix is here: https://gitlab.com/samba-team/samba/-/merge_requests/1264
Comment 1 Jo Sutton 2021-03-19 00:13:25 UTC
Merged into master as 84c7eb47 for Samba 4.13.