From: Pavel Filipenský Date: Wed, 27 Jul 2022 15:21:08 +0000 (+0200) Subject: s3:libsmb: Zero memory in trust_pw_change() X-Git-Tag: talloc-2.4.0~1325 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=988077c33602c62a47a1dab67e846ed28352088d;p=thirdparty%2Fsamba.git s3:libsmb: Zero memory in trust_pw_change() Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c index 7ad73cfd8db..356366b6a9d 100644 --- a/source3/libsmb/trusts_util.c +++ b/source3/libsmb/trusts_util.c @@ -311,6 +311,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context, TALLOC_FREE(frame); return status; } + talloc_keep_secret(new_trust_pw_blob.data); switch (sec_channel_type) { @@ -365,7 +366,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context, * We use the password that's already persistent in * our database in order to handle failures. */ - data_blob_clear_free(&new_trust_pw_blob); + data_blob_free(&new_trust_pw_blob); new_trust_pw_blob = info->next_change->password->cleartext_blob; break;