diff options
author | Michele Baldessari <michele@acksyn.org> | 2012-09-06 17:32:11 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-09-07 04:11:43 +0200 |
commit | d0159f6673e0fdf50f096548ea1a134c0e864ceb (patch) | |
tree | 09a530211f96e97e397d6807f7765520d0d7ede1 /source3 | |
parent | 54ae7ca417628ddae5be275891f3782f245d7c5f (diff) | |
download | samba-d0159f6673e0fdf50f096548ea1a134c0e864ceb.tar.gz samba-d0159f6673e0fdf50f096548ea1a134c0e864ceb.tar.bz2 samba-d0159f6673e0fdf50f096548ea1a134c0e864ceb.zip |
Free protect_ids in secret_store_domain_guid() as the caller of fetch_secrets() must free the result in order to not leak memory.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 7 04:11:43 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/machine_account_secrets.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index 70d7106176..6320f4e2f7 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -149,9 +149,11 @@ bool secrets_store_domain_guid(const char *domain, struct GUID *guid) if (strncmp(protect_ids, "TRUE", 4)) { DEBUG(0, ("Refusing to store a Domain SID, " "it has been marked as protected!\n")); + SAFE_FREE(protect_ids); return false; } } + SAFE_FREE(protect_ids); #endif slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); |