From 56a99b1d1c9382aee346cc04b0979148ff485bc8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 9 Mar 2006 21:13:54 +0000 Subject: r14102: Fix Coverity bug # 70 (This used to be commit 56dc19879c6514cbdd0b1fd186c8bdeb61bf151a) --- source3/passdb/secrets.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit