From: Volker Lendecke Date: Thu, 14 Nov 2024 19:47:53 +0000 (+0100) Subject: ntlm_auth: Fix Coverity ID 240743 Resource leak X-Git-Tag: tdb-1.4.13~503 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e6f2e6cbc0f9553c06e1697cd1c5ee025d09c11;p=thirdparty%2Fsamba.git ntlm_auth: Fix Coverity ID 240743 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 3642df89c8d..905f33840b1 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -2455,7 +2455,7 @@ static bool check_auth_crap(void) char user_session_key[16]; char *hex_lm_key; char *hex_user_session_key; - char *error_string; + char *error_string = NULL; uint8_t authoritative = 1; setbuf(stdout, NULL); @@ -2485,6 +2485,7 @@ static bool check_auth_crap(void) SAFE_FREE(error_string); return False; } + SAFE_FREE(error_string); if (request_lm_key && (!all_zero((uint8_t *)lm_key, sizeof(lm_key)))) {