From: Pavel Filipenský Date: Fri, 5 Aug 2022 09:09:37 +0000 (+0200) Subject: s3: Zero memory of idmap_fetch_secret() users X-Git-Tag: talloc-2.4.0~1320 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04d4bc54949e646cfa86a14b051879edde56048a;p=thirdparty%2Fsamba.git s3: Zero memory of idmap_fetch_secret() users Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 4815dd81fc3..cb85208bfb1 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -1744,7 +1744,7 @@ void smbldap_free_struct(struct smbldap_state **ldap_state) } SAFE_FREE((*ldap_state)->bind_dn); - SAFE_FREE((*ldap_state)->bind_secret); + BURN_FREE_STR((*ldap_state)->bind_secret); smbldap_set_bind_callback(*ldap_state, NULL, NULL); TALLOC_FREE(*ldap_state); diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index 36ab94b7667..7ad5ff47acf 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -107,7 +107,7 @@ static NTSTATUS get_credentials( TALLOC_CTX *mem_ctx, ret = NT_STATUS_OK; done: - SAFE_FREE(secret); + BURN_FREE_STR(secret); return ret; } diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c index d84cf930f75..2b3223829e2 100644 --- a/source3/winbindd/idmap_rfc2307.c +++ b/source3/winbindd/idmap_rfc2307.c @@ -198,7 +198,7 @@ static NTSTATUS idmap_rfc2307_init_ldap(struct idmap_rfc2307_context *ctx, ret = smbldap_init(mem_ctx, global_event_context(), url, (user_dn == NULL), user_dn, secret, &ctx->smbldap_state); - SAFE_FREE(secret); + BURN_FREE_STR(secret); if (!NT_STATUS_IS_OK(ret)) { DEBUG(1, ("ERROR: smbldap_init (%s) failed!\n", url)); goto done;