From da3053048c3d224a20d6383ac6682d31059cd46c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 11 Mar 2001 00:32:10 +0000 Subject: Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549) --- source3/rpc_parse/parse_lsa.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'source3/rpc_parse/parse_lsa.c') diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index d86df0ee11..98ef3fd0ee 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -591,17 +591,16 @@ BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, num_domains = r_e->num_domains2; - if (!(r_e->hdr_domain_name = (UNIHDR2 *) - malloc(sizeof(UNIHDR2) * num_domains))) - return False; + if (UNMARSHALLING(ps)) { + if (!(r_e->hdr_domain_name = (UNIHDR2 *)prs_alloc_mem(ps,sizeof(UNIHDR2) * num_domains))) + return False; - if (!(r_e->uni_domain_name = (UNISTR2 *) - malloc(sizeof(UNISTR2) * num_domains))) - return False; + if (!(r_e->uni_domain_name = (UNISTR2 *)prs_alloc_mem(ps,sizeof(UNISTR2) * num_domains))) + return False; - if (!(r_e->domain_sid = (DOM_SID2 *) - malloc(sizeof(DOM_SID2) * num_domains))) - return False; + if (!(r_e->domain_sid = (DOM_SID2 *)prs_alloc_mem(ps,sizeof(DOM_SID2) * num_domains))) + return False; + } for (i = 0; i < num_domains; i++) { if(!smb_io_unihdr2 ("", &r_e->hdr_domain_name[i], ps, -- cgit