From 02fd43490212e9ff8f784ce4d33d64566d58fd82 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 9 Jun 2007 00:27:28 +0000 Subject: [PATCH] r23402: Got bitten by a talloc hierarchy. Make sure we alloc off the pipe ctx now ->names is part of the containing struct. Jeremy. --- source/rpc_server/srv_lsa_nt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c index f9b86d0c672..0d29df72bf1 100644 --- a/source/rpc_server/srv_lsa_nt.c +++ b/source/rpc_server/srv_lsa_nt.c @@ -420,7 +420,7 @@ static NTSTATUS init_reply_lookup_sids(TALLOC_CTX *mem_ctx, if (names->num_entries) { int i; - oldnames->name = TALLOC_ARRAY(oldnames, LSA_TRANS_NAME, names->num_entries); + oldnames->name = TALLOC_ARRAY(mem_ctx, LSA_TRANS_NAME, names->num_entries); if (!oldnames->name) { return NT_STATUS_NO_MEMORY; @@ -838,8 +838,8 @@ static NTSTATUS _lsa_lookup_sids_internal(pipes_struct *p, return status; } - names->name = TALLOC_ARRAY(names, LSA_TRANS_NAME2, num_sids); - names->uni_name = TALLOC_ARRAY(names, UNISTR2, num_sids); + names->name = TALLOC_ARRAY(p->mem_ctx, LSA_TRANS_NAME2, num_sids); + names->uni_name = TALLOC_ARRAY(p->mem_ctx, UNISTR2, num_sids); if ((names->name == NULL) || (names->uni_name == NULL)) { return NT_STATUS_NO_MEMORY; } -- 2.34.1