1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:passdb: Zero memory using BURN_FREE_STR() in get_trust_pw_hash2()

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Pavel Filipenský 2022-08-02 17:32:43 +02:00 committed by Andreas Schneider
parent ca3c9fa0f3
commit ad9044a17a

View 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;