summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/trusts_util.c
diff options
context:
space:
mode:
authorJose A. Rivera <jarrpa@redhat.com>2014-02-20 09:14:59 -0600
committerSimo Sorce <idra@samba.org>2014-02-22 00:58:23 +0100
commit2b77b072862accc3fffddc964740917102898567 (patch)
treee66b7dc19f27117f1cc11ecf9d6a353630abc6cf /source3/libsmb/trusts_util.c
parent9a9e56943d186e5a8655b5d731a339e453da8ae8 (diff)
downloadsamba-2b77b072862accc3fffddc964740917102898567.tar.gz
samba-2b77b072862accc3fffddc964740917102898567.tar.xz
samba-2b77b072862accc3fffddc964740917102898567.zip
s3/libsmb: Free memdup'd local variable
secrets_fetch_machine_password() sets pwd to point to memdup()'d (and thus malloc()'d) memory. This memory should be freed before we go out of scope. Change-Id: I07e575819c309fa5b85627dce2eb969bc720ce4e Coverity-Id: 1168001 Reviewed-by: Ira Cooper <ira@samba.org> Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Sat Feb 22 00:58:23 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/libsmb/trusts_util.c')
-rw-r--r--source3/libsmb/trusts_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index b38aec648b..bb2e977cc5 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -118,6 +118,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context,
TALLOC_FREE(frame);
return NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE;
}
+ free(pwd);
break;
case SEC_CHAN_DOMAIN:
if (!pdb_get_trusteddom_pw(domain, &pwd, &sid, &pass_last_set_time)) {