From f6efb5a653cefe5053e54f708ab1e65b18cbec81 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 14 Nov 2024 21:02:09 +0100 Subject: [PATCH] ntlm_auth: Fix Coverity ID 240748 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/utils/ntlm_auth_diagnostics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.47.3