From 13b1bf5d47cb764365f6a14e35a4aa55b9a7e355 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 4 Mar 2010 22:18:10 +0100 Subject: s4:auth/sam.c - change base context for the "tmp_ctx" context in "authsam_expand_nested_groups" Better use the "res_sids_ctx" as base context for the "tmp_ctx" and not the long-living "sam_ctx"/"ldb" context to prevent memory leaks. --- source4/auth/sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/auth/sam.c b/source4/auth/sam.c index 20efc3684a..fc3e810ef7 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -336,7 +336,7 @@ _PUBLIC_ NTSTATUS authsam_expand_nested_groups(struct ldb_context *sam_ctx, ++(*num_res_sids); } - tmp_ctx = talloc_new(sam_ctx); + tmp_ctx = talloc_new(res_sids_ctx); ret = gendb_search(sam_ctx, tmp_ctx, NULL, &res, attrs, "objectSid=%s", ldap_encode_ndr_dom_sid(tmp_ctx, sid)); -- cgit