From f461e53e7a493b15c53c97a5e1210cab5b069282 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 9 Jun 2007 00:27:28 +0000 Subject: r23402: Got bitten by a talloc hierarchy. Make sure we alloc off the pipe ctx now ->names is part of the containing struct. Jeremy. (This used to be commit 02fd43490212e9ff8f784ce4d33d64566d58fd82) --- source3/rpc_server/srv_lsa_nt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/rpc_server') diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index f9b86d0c67..0d29df72bf 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/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; } -- cgit