]> git.ipfire.org Git - thirdparty/samba.git/commit
s3:client: Use talloc to avoid memory leaks in smbspool
authorAndreas Schneider <asn@samba.org>
Wed, 22 Oct 2025 09:24:24 +0000 (11:24 +0200)
committerAnoop C S <anoopcs@samba.org>
Fri, 24 Oct 2025 07:42:37 +0000 (07:42 +0000)
commita663d07c7eaab06008eea06057da65ee0099a227
tree0c1ac8f6f78c115671f277887a106f707286125b
parentba87122e9c0b1cc3332a21e20ce944bb842ed9b5
s3:client: Use talloc to avoid memory leaks in smbspool

The function uri_unescape_alloc() is called by main() which has a talloc
stackframe.

Direct leak of 13 byte(s) in 1 object(s) allocated from:
    #0 0x7fc31351b9a0 in strdup (/lib64/libasan.so.8+0x11b9a0) (BuildId: 388ee9ac193f74c177c6f52988d2d0dab110de41)
    #1 0x7fc3129cfb50 in smb_xstrdup ../../lib/util/util.c:760
    #2 0x0000002059f8 in uri_unescape_alloc ../../source3/client/smbspool.c:888
    #3 0x00000020752a in main ../../source3/client/smbspool.c:347
    #4 0x7fc30f62b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) (BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
    #5 0x7ffd8bb806be  ([stack]+0x3b6be)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Oct 24 07:42:37 UTC 2025 on atb-devel-224
source3/client/smbspool.c