From f56ce215c7fc957f5e24f015343366239c7fe900 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 2 Nov 2017 21:49:43 +0100 Subject: [PATCH] s3:passdb: Fix a memory leak in secrets_fetch_or_upgrade_domain_info() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Nov 13 14:05:46 CET 2017 on sn-devel-144 --- source3/passdb/machine_account_secrets.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index 75f31cb04e2..40511f96a8b 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -1476,6 +1476,7 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char *domain, DBG_ERR("secrets_domain_info_password_create(pw) failed " "for %s - %s\n", domain, nt_errstr(status)); dbwrap_transaction_cancel(db); + SAFE_FREE(old_pw); TALLOC_FREE(frame); return status; }