]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ntlm_auth: Fix Coverity ID 240743 Resource leak
authorVolker Lendecke <vl@samba.org>
Thu, 14 Nov 2024 19:47:53 +0000 (20:47 +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.c

index 3642df89c8dd3287c01ae85d3ac5d23b916f3e54..905f33840b101a36cc53c0a3bed7e3a806c5dbb8 100644 (file)
@@ -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)))) {