]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:passdb: Zero memory using BURN_FREE_STR() in get_trust_pw_hash2()
authorPavel Filipenský <pfilipensky@samba.org>
Tue, 2 Aug 2022 15:32:43 +0000 (17:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 26 Aug 2022 07:59:32 +0000 (07:59 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/passdb/passdb.c

index 526dea5f7b4d77b7deb35469a91b66d2ed4719db..00a430eb2d9d047b956f02f0add1cac042b53f5d 100644 (file)
@@ -2491,7 +2491,7 @@ static bool get_trust_pw_hash2(const char *domain,
                struct samr_Password *previous_nt_hash = NULL;
 
                E_md4hash(cur_pw, current_nt_hash->hash);
-               SAFE_FREE(cur_pw);
+               BURN_FREE_STR(cur_pw);
 
                if (prev_pw == NULL) {
                        return true;
@@ -2503,7 +2503,7 @@ static bool get_trust_pw_hash2(const char *domain,
                }
 
                E_md4hash(prev_pw, previous_nt_hash->hash);
-               SAFE_FREE(prev_pw);
+               BURN_FREE_STR(prev_pw);
 
                *_previous_nt_hash = previous_nt_hash;
                return true;