summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-08 21:51:07 +0100
committerMichael Adam <obnox@samba.org>2008-01-09 01:47:10 +0100
commitf168fac54c971286940f7471e45fa2c6eac76142 (patch)
tree0526c32efca246956364ecd5ad2e5373c7766cac /source3/groupdb
parent3ff1fc3932a019abfb1fd475d68477c16379b10d (diff)
downloadsamba-f168fac54c971286940f7471e45fa2c6eac76142.tar.gz
samba-f168fac54c971286940f7471e45fa2c6eac76142.tar.bz2
samba-f168fac54c971286940f7471e45fa2c6eac76142.zip
Don't leak data.dptr on error path.
Michael (This used to be commit d14de0692c623ff07dada45a3d7bec03ceca2b7e)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_tdb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index cf9f9058af..9adde40426 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -394,6 +394,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
char *string_sid;
TDB_DATA dbuf;
const char *p;
+ NTSTATUS status;
TALLOC_CTX *frame;
slprintf(key, sizeof(key), "%s%s", MEMBEROF_PREFIX,
@@ -414,14 +415,15 @@ static NTSTATUS one_alias_membership(const DOM_SID *member,
continue;
if (!add_sid_to_array_unique(NULL, &alias, sids, num)) {
- TALLOC_FREE(frame);
- return NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
}
}
+done:
TALLOC_FREE(frame);
SAFE_FREE(dbuf.dptr);
- return NT_STATUS_OK;
+ return status;
}
static NTSTATUS alias_memberships(const DOM_SID *members, size_t num_members,