summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-03-09 21:13:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:11:12 -0500
commit56a99b1d1c9382aee346cc04b0979148ff485bc8 (patch)
treecf4d13309f433638aca610b0050c0ce456808589 /source3/passdb
parent35d2856ae34c4c4231f604227c4a23e023b8699c (diff)
downloadsamba-56a99b1d1c9382aee346cc04b0979148ff485bc8.tar.gz
samba-56a99b1d1c9382aee346cc04b0979148ff485bc8.tar.bz2
samba-56a99b1d1c9382aee346cc04b0979148ff485bc8.zip
r14102: Fix Coverity bug # 70
(This used to be commit 56dc19879c6514cbdd0b1fd186c8bdeb61bf151a)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 927337d947..f7bc044916 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -702,6 +702,7 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
k->node_key.dsize);
if (!secrets_key) {
DEBUG(0, ("strndup failed!\n"));
+ tdb_search_list_free(keys);
return NT_STATUS_NO_MEMORY;
}
@@ -728,12 +729,14 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
dom_info = TALLOC_P(mem_ctx, struct trustdom_info);
if (dom_info == NULL) {
DEBUG(0, ("talloc failed\n"));
+ tdb_search_list_free(keys);
return NT_STATUS_NO_MEMORY;
}
if (pull_ucs2_talloc(mem_ctx, &dom_info->name,
pass.uni_name) < 0) {
DEBUG(2, ("pull_ucs2_talloc failed\n"));
+ tdb_search_list_free(keys);
return NT_STATUS_NO_MEMORY;
}
@@ -743,6 +746,7 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
domains, num_domains);
if (*domains == NULL) {
+ tdb_search_list_free(keys);
return NT_STATUS_NO_MEMORY;
}
talloc_steal(*domains, dom_info);