mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s4:torture: Fix memory leak
Direct leak of 102 byte(s) in 1 object(s) allocated from: #0 0x7f35322fc7d7 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f3531e43bc2 in __talloc_with_prefix ../../lib/talloc/talloc.c:783 #2 0x7f3531e45034 in __talloc ../../lib/talloc/talloc.c:825 #3 0x7f3531e45034 in __talloc_strlendup ../../lib/talloc/talloc.c:2454 #4 0x7f3531e45034 in talloc_strdup ../../lib/talloc/talloc.c:2470 #5 0x7f352f90264b in smbcli_parse_unc ../../source4/libcli/cliconnect.c:269 #6 0x55fbf83aa207 in torture_parse_target ../../source4/torture/smbtorture.c:192 #7 0x55fbf83ae031 in main ../../source4/torture/smbtorture.c:744 #8 0x7f352ca2a1ef in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Aug 1 16:55:43 UTC 2024 on atb-devel-224
This commit is contained in:
parent
a105595697
commit
48963251fb
@ -189,7 +189,7 @@ bool torture_parse_target(TALLOC_CTX *ctx,
|
||||
NTSTATUS status;
|
||||
|
||||
/* see if its a RPC transport specifier */
|
||||
if (!smbcli_parse_unc(target, NULL, &host, &share)) {
|
||||
if (!smbcli_parse_unc(target, ctx, &host, &share)) {
|
||||
const char *h;
|
||||
|
||||
status = dcerpc_parse_binding(ctx, target, &binding_struct);
|
||||
@ -211,6 +211,9 @@ bool torture_parse_target(TALLOC_CTX *ctx,
|
||||
lpcfg_set_cmdline(lp_ctx, "torture:host", host);
|
||||
lpcfg_set_cmdline(lp_ctx, "torture:share", share);
|
||||
lpcfg_set_cmdline(lp_ctx, "torture:binding", host);
|
||||
|
||||
TALLOC_FREE(host);
|
||||
TALLOC_FREE(share);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user