From f0c7dc544bccda5eb87f56cbd5a49ca8d8372cb1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 16 Dec 2006 01:52:06 +0000 Subject: r20207: Fix a couple more places where extra_data was being talloc'ed off the NULL context instead of being malloced. Jeremy. (This used to be commit 47bdeb4efeaa5a441ad2d39bb3b94d72263e66e4) --- source3/nsswitch/winbindd_group.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch/winbindd_group.c') diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index deee07413c..1b21352c86 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -1384,12 +1384,15 @@ enum winbindd_result winbindd_dual_getuserdomgroups(struct winbindd_domain *doma return WINBINDD_OK; } - if (!print_sidlist(NULL, groups, num_groups, &sidstring, &len)) { - DEBUG(0, ("malloc failed\n")); + if (!print_sidlist(state->mem_ctx, groups, num_groups, &sidstring, &len)) { + DEBUG(0, ("talloc failed\n")); return WINBINDD_ERROR; } - state->response.extra_data.data = sidstring; + state->response.extra_data.data = SMB_STRDUP(sidstring); + if (!state->response.extra_data.data) { + return WINBINDD_ERROR; + } state->response.length += len+1; state->response.data.num_entries = num_groups; -- cgit