From: Volker Lendecke Date: Thu, 14 Nov 2024 20:02:09 +0000 (+0100) Subject: ntlm_auth: Fix Coverity ID 240748 Resource leak X-Git-Tag: tdb-1.4.13~501 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6efb5a653cefe5053e54f708ab1e65b18cbec81;p=thirdparty%2Fsamba.git ntlm_auth: Fix Coverity ID 240748 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c index b0c5f490f7f..15f927c4d9b 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -289,7 +289,7 @@ static bool test_ntlm_in_both(bool lanman_support_expected) uint8_t user_session_key[16]; uint8_t nt_hash[16]; DATA_BLOB chall = get_challenge(); - char *error_string; + char *error_string = NULL; ZERO_STRUCT(lm_key); ZERO_STRUCT(user_session_key); @@ -323,6 +323,7 @@ static bool test_ntlm_in_both(bool lanman_support_expected) SAFE_FREE(error_string); return False; } + SAFE_FREE(error_string); /* If we are told the DC is Samba4, expect an LM key of zeros */ if (!lanman_support_expected) {