mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +03:00
s3:utils: Fix memory leak in ntlm_auth_diagnostics
Direct leak of 120 byte(s) in 1 object(s) allocated from: #0 0x7f2f7f0fc777 in malloc ../../../../libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f2f7ee24c57 in __talloc_with_prefix ../../lib/talloc/talloc.c:783 #2 0x7f2f7ee26acf in __talloc ../../lib/talloc/talloc.c:825 #3 0x7f2f7ee26acf in _talloc_named_const ../../lib/talloc/talloc.c:982 #4 0x7f2f7ee26acf in _talloc_array ../../lib/talloc/talloc.c:2784 #5 0x7f2f7e3f6a99 in data_blob_talloc_named ../../lib/util/data_blob.c:58 #6 0x7f2f7e3f6b1b in data_blob_named ../../lib/util/data_blob.c:40 #7 0x5570b9e36100 in test_lm_ntlm_broken ../../source3/utils/ntlm_auth_diagnostics.c:56 #8 0x5570b9e36b5d in test_ntlm ../../source3/utils/ntlm_auth_diagnostics.c:180 #9 0x5570b9e387f3 in diagnose_ntlm_auth ../../source3/utils/ntlm_auth_diagnostics.c:707 #10 0x5570b9e34efd in main ../../source3/utils/ntlm_auth.c:2855 #11 0x7f2f7ba2a2ad in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
dcd8851a4d
commit
4f3fbb75d5
@ -106,12 +106,15 @@ static bool test_lm_ntlm_broken(enum ntlm_break break_which,
|
||||
&error_string, NULL);
|
||||
|
||||
data_blob_free(&lm_response);
|
||||
data_blob_free(&nt_response);
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
d_printf("%s (0x%x)\n",
|
||||
error_string,
|
||||
NT_STATUS_V(nt_status));
|
||||
SAFE_FREE(error_string);
|
||||
data_blob_free(&session_key);
|
||||
|
||||
return break_which == BREAK_NT;
|
||||
}
|
||||
|
||||
@ -158,6 +161,8 @@ static bool test_lm_ntlm_broken(enum ntlm_break break_which,
|
||||
pass = False;
|
||||
}
|
||||
}
|
||||
data_blob_free(&session_key);
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user