summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-07-26 17:24:51 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-31 13:49:01 +0200
commit8ab6e51defdd59e08213b130608f64606657493d (patch)
tree1bde01f6541e2c41c12dc7c8d73ae3d66c481c31 /libcli
parent9607b66a93c72509fed3f7c47ce3d3a85ee541c4 (diff)
downloadsamba-8ab6e51defdd59e08213b130608f64606657493d.tar.gz
lib: Fix an error path memleak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jul 31 13:49:02 CEST 2017 on sn-devel-144
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/schannel_state_tdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index f55ae0ffb56..6a19823f639 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -263,11 +263,13 @@ NTSTATUS schannel_save_creds_state(TALLOC_CTX *mem_ctx,
db_sc = open_schannel_session_store(tmpctx, lp_ctx);
if (!db_sc) {
- return NT_STATUS_ACCESS_DENIED;
+ status = NT_STATUS_ACCESS_DENIED;
+ goto fail;
}
status = schannel_store_session_key_tdb(db_sc, tmpctx, creds);
+fail:
talloc_free(tmpctx);
return status;
}