From: Volker Lendecke Date: Thu, 14 Nov 2024 20:03:02 +0000 (+0100) Subject: ntlm_auth: Fix Coverity ID 240749 Resource leak X-Git-Tag: tdb-1.4.13~500 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9900bb45550ece6010626cc502cf89a98a4e8f28;p=thirdparty%2Fsamba.git ntlm_auth: Fix Coverity ID 240749 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 15f927c4d9b..dbce3ed4fdf 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -200,7 +200,7 @@ static bool test_ntlm_in_lm(bool lanman_support_expected) uchar lm_hash[16]; uchar user_session_key[16]; DATA_BLOB chall = get_challenge(); - char *error_string; + char *error_string = NULL; ZERO_STRUCT(user_session_key); @@ -231,6 +231,7 @@ static bool test_ntlm_in_lm(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) {