summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_lsa.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-24 07:32:51 +0000
committerJeremy Allison <jra@samba.org>2001-08-24 07:32:51 +0000
commit659774bffdf926f461dfe497160c1aabc8773c4d (patch)
tree4d7cb79f3517b0265ba86acd012afe7aaec71c98 /source3/rpc_parse/parse_lsa.c
parent98e407a02169f65c5518472f9e1edf7ec79c3a8c (diff)
downloadsamba-659774bffdf926f461dfe497160c1aabc8773c4d.tar.gz
samba-659774bffdf926f461dfe497160c1aabc8773c4d.tar.bz2
samba-659774bffdf926f461dfe497160c1aabc8773c4d.zip
Fixed malloc -> talloc problems pointed out by Simo.
Jeremy (This used to be commit 0f5b187387fb536a6866d9109eff82411798f79e)
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r--source3/rpc_parse/parse_lsa.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index d07c91e137..2c588912fe 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -530,7 +530,7 @@ BOOL lsa_io_q_enum_trust_dom(char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
Inits an LSA_R_ENUM_TRUST_DOM structure.
********************************************************************/
-void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context,
+void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context,
char *domain_name, DOM_SID *domain_sid,
uint32 status)
{
@@ -545,14 +545,14 @@ void init_r_enum_trust_dom(LSA_R_ENUM_TRUST_DOM *r_e, uint32 enum_context,
r_e->ptr_enum_domains = 1;
r_e->num_domains2 = 1;
- if (!(r_e->hdr_domain_name = (UNIHDR2 *)
- malloc(sizeof(UNIHDR2)))) return;
+ if (!(r_e->hdr_domain_name = (UNIHDR2 *)talloc(ctx,sizeof(UNIHDR2))))
+ return;
- if (!(r_e->uni_domain_name = (UNISTR2 *)
- malloc(sizeof(UNISTR2)))) return;
+ if (!(r_e->uni_domain_name = (UNISTR2 *)talloc(ctx,sizeof(UNISTR2))))
+ return;
- if (!(r_e->domain_sid = (DOM_SID2 *)
- malloc(sizeof(DOM_SID2)))) return;
+ if (!(r_e->domain_sid = (DOM_SID2 *)talloc(ctx,sizeof(DOM_SID2))))
+ return;
init_uni_hdr2(&r_e->hdr_domain_name[0], len_domain_name);
init_unistr2 (&r_e->uni_domain_name[0], domain_name,