]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ntlm_auth: Fix Coverity ID 240749 Resource leak
authorVolker Lendecke <vl@samba.org>
Thu, 14 Nov 2024 20:03:02 +0000 (21:03 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 19 Nov 2024 18:11:29 +0000 (18:11 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/ntlm_auth_diagnostics.c

index 15f927c4d9b6cd5f9a04655c2c9cb845468136d9..dbce3ed4fdf8b68576f10fabe1244fc9ff6d257f 100644 (file)
@@ -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) {