From: Volker Lendecke Date: Thu, 14 Nov 2024 20:04:02 +0000 (+0100) Subject: ntlm_auth: Fix Coverity ID 240750 Resource leak X-Git-Tag: tdb-1.4.13~499 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dcf69bc06c1dcd94159621339b6987d4fb2a42e7;p=thirdparty%2Fsamba.git ntlm_auth: Fix Coverity ID 240750 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 dbce3ed4fdf..1a57f7726f2 100644 --- a/source3/utils/ntlm_auth_diagnostics.c +++ b/source3/utils/ntlm_auth_diagnostics.c @@ -513,7 +513,7 @@ static bool test_plaintext(enum ntlm_break break_which) uchar lm_key[16]; static const uchar zeros[8] = { 0, }; DATA_BLOB chall = data_blob(zeros, sizeof(zeros)); - char *error_string; + char *error_string = NULL; ZERO_STRUCT(user_session_key); @@ -587,6 +587,7 @@ static bool test_plaintext(enum ntlm_break break_which) SAFE_FREE(error_string); return break_which == BREAK_NT; } + SAFE_FREE(error_string); return break_which != BREAK_NT; }