summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-06 15:33:26 +0100
committerVolker Lendecke <vl@samba.org>2011-02-06 16:44:56 +0100
commit47d07df37f5b089ff16ee0e28cde23ed9470f214 (patch)
tree98277aa0f36a77c12644be7d61536b02259e2396 /source3/passdb
parent843825f56728a6cec2b0b00cc32f97b4b05b3ea8 (diff)
downloadsamba-47d07df37f5b089ff16ee0e28cde23ed9470f214.tar.gz
samba-47d07df37f5b089ff16ee0e28cde23ed9470f214.tar.bz2
samba-47d07df37f5b089ff16ee0e28cde23ed9470f214.zip
s3: Fix a potential memleak in secrets_fetch_trusted_domain_password
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 28a725a741..6571e6ef6b 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -235,11 +235,13 @@ bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
/* unpack trusted domain password */
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &pass,
(ndr_pull_flags_fn_t)ndr_pull_TRUSTED_DOM_PASS);
+
+ SAFE_FREE(blob.data);
+
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
}
- SAFE_FREE(blob.data);
/* the trust's password */
if (pwd) {