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
Merged into master as 84c7eb47 for Samba 4.13.