git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07e18e8
)
s4:auth/sam.c - fix the free of memory contexts
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Fri, 3 Dec 2010 08:18:23 +0000
(09:18 +0100)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Fri, 3 Dec 2010 08:18:23 +0000
(09:18 +0100)
"tmp_ctx" needs always to be freed ("res" is freed implicitly)
source4/auth/sam.c
patch
|
blob
|
history
diff --git
a/source4/auth/sam.c
b/source4/auth/sam.c
index cbaa2699c7a3327fd642f16a04c92e0374954c4a..bd9278036e446f427df1e874f27e7e393054cf69 100644
(file)
--- 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;
}