diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-30 02:39:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:49 -0500 |
commit | be8b0685a55700c6bce3681734800ec6434b0364 (patch) | |
tree | 8616d85686fb147d431eeea435233f45d5ee8d41 /source3/nsswitch/wb_client.c | |
parent | 79de0ad9463a5cd64978beae37df79fbb4f74632 (diff) | |
download | samba-be8b0685a55700c6bce3681734800ec6434b0364.tar.gz samba-be8b0685a55700c6bce3681734800ec6434b0364.tar.bz2 samba-be8b0685a55700c6bce3681734800ec6434b0364.zip |
r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
(This used to be commit 8968808c3b5b0208cbad9ac92eaf948f2c546dd9)
Diffstat (limited to 'source3/nsswitch/wb_client.c')
-rw-r--r-- | source3/nsswitch/wb_client.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c index afb6202754..25fbefc45e 100644 --- a/source3/nsswitch/wb_client.c +++ b/source3/nsswitch/wb_client.c @@ -165,11 +165,16 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx, *domain_name = talloc_strdup(mem_ctx, response.data.domain_name); - *names = TALLOC_ARRAY(mem_ctx, const char *, num_rids); - *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids); + if (num_rids) { + *names = TALLOC_ARRAY(mem_ctx, const char *, num_rids); + *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids); - if ((*names == NULL) || (*types == NULL)) { - goto fail; + if ((*names == NULL) || (*types == NULL)) { + goto fail; + } + } else { + *names = NULL; + *types = NULL; } p = (char *)response.extra_data.data; |