summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-06-09 00:27:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:13 -0500
commitf461e53e7a493b15c53c97a5e1210cab5b069282 (patch)
tree4d1b1ae8c8bd92a047cb3072c3d605fc9f4cd413
parent2e6deee0208aba89fb3ecc7ead62d867e4da20ea (diff)
downloadsamba-f461e53e7a493b15c53c97a5e1210cab5b069282.tar.gz
samba-f461e53e7a493b15c53c97a5e1210cab5b069282.tar.bz2
samba-f461e53e7a493b15c53c97a5e1210cab5b069282.zip
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)
-rw-r--r--source3/rpc_server/srv_lsa_nt.c6
1 files changed, 3 insertions, 3 deletions
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;
}