From 9900bb45550ece6010626cc502cf89a98a4e8f28 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 14 Nov 2024 21:03:02 +0100 Subject: [PATCH] ntlm_auth: Fix Coverity ID 240749 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 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) { -- 2.11.4.GIT