summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-03 09:18:23 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-03 09:18:23 +0100
commit5e1c9b562c4bf89d0d2e9a423a6fa0bf48b6da6b (patch)
tree0fc544d9889efb1cb52e3ce20038c8ac98b16687
parent07e18e8f7c5687d00160a1760411099736444c7c (diff)
downloadsamba-5e1c9b562c4bf89d0d2e9a423a6fa0bf48b6da6b.tar.gz
samba-5e1c9b562c4bf89d0d2e9a423a6fa0bf48b6da6b.tar.bz2
samba-5e1c9b562c4bf89d0d2e9a423a6fa0bf48b6da6b.zip
s4:auth/sam.c - fix the free of memory contexts
"tmp_ctx" needs always to be freed ("res" is freed implicitly)
-rw-r--r--source4/auth/sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index cbaa2699c7..bd9278036e 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -353,6 +353,7 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx,
already_there = sids_contains_sid((const struct dom_sid**) *res_sids,
*num_res_sids, &sid);
if (already_there) {
+ talloc_free(tmp_ctx);
return NT_STATUS_OK;
}
@@ -396,7 +397,6 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx,
status = authsam_expand_nested_groups(sam_ctx, &el->values[i],
false, filter, res_sids_ctx, res_sids, num_res_sids);
if (!NT_STATUS_IS_OK(status)) {
- talloc_free(res);
talloc_free(tmp_ctx);
return status;
}