summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_ads.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-30 02:51:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:49 -0500
commit56a5d05b8b285250bdc0e9cc3c8f3c3d8af80382 (patch)
treefe800dc017985b616874b79ffad6122a1e5bde34 /source3/nsswitch/winbindd_ads.c
parentbe8b0685a55700c6bce3681734800ec6434b0364 (diff)
downloadsamba-56a5d05b8b285250bdc0e9cc3c8f3c3d8af80382.tar.gz
samba-56a5d05b8b285250bdc0e9cc3c8f3c3d8af80382.tar.bz2
samba-56a5d05b8b285250bdc0e9cc3c8f3c3d8af80382.zip
r22590: Make TALLOC_ARRAY consistent across all uses.
That should be it.... Jeremy. (This used to be commit 603233a98bbf65467c8b4f04719d771c70b3b4c9)
Diffstat (limited to 'source3/nsswitch/winbindd_ads.c')
-rw-r--r--source3/nsswitch/winbindd_ads.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c
index 01174edf37..355a093855 100644
--- a/source3/nsswitch/winbindd_ads.c
+++ b/source3/nsswitch/winbindd_ads.c
@@ -907,16 +907,21 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
the problem is that the members are in the form of distinguised names
*/
- (*sid_mem) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, num_members);
- (*name_types) = TALLOC_ZERO_ARRAY(mem_ctx, uint32, num_members);
- (*names) = TALLOC_ZERO_ARRAY(mem_ctx, char *, num_members);
-
- if ((num_members != 0) &&
- ((members == NULL) || (*sid_mem == NULL) ||
- (*name_types == NULL) || (*names == NULL))) {
- DEBUG(1, ("talloc failed\n"));
- status = NT_STATUS_NO_MEMORY;
- goto done;
+ if (num_members) {
+ (*sid_mem) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, num_members);
+ (*name_types) = TALLOC_ZERO_ARRAY(mem_ctx, uint32, num_members);
+ (*names) = TALLOC_ZERO_ARRAY(mem_ctx, char *, num_members);
+
+ if ((members == NULL) || (*sid_mem == NULL) ||
+ (*name_types == NULL) || (*names == NULL)) {
+ DEBUG(1, ("talloc failed\n"));
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+ } else {
+ (*sid_mem) = NULL;
+ (*name_types) = NULL;
+ (*names) = NULL;
}
for (i=0;i<num_members;i++) {