summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2012-09-05 10:56:06 -0700
committerJeremy Allison <jra@samba.org>2012-09-05 22:20:45 +0200
commite00ac55994ad7d067f7f628ae4157f0d23f819c4 (patch)
tree22bd41a0f39df3aac092efae0c64bcd733b51281 /source3/passdb
parent43d619b2bb4f5fd02fc3d694cb7328fc69c71b5e (diff)
downloadsamba-e00ac55994ad7d067f7f628ae4157f0d23f819c4.tar.gz
samba-e00ac55994ad7d067f7f628ae4157f0d23f819c4.tar.bz2
samba-e00ac55994ad7d067f7f628ae4157f0d23f819c4.zip
Free protect_ids in secret_store_domain_sid() 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): Wed Sep 5 22:20:45 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/machine_account_secrets.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c
index 300455a2e5..70d7106176 100644
--- a/source3/passdb/machine_account_secrets.c
+++ b/source3/passdb/machine_account_secrets.c
@@ -101,9 +101,11 @@ bool secrets_store_domain_sid(const char *domain, const struct dom_sid *sid)
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
ret = secrets_store(domain_sid_keystr(domain), sid, sizeof(struct dom_sid ));