summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-19 14:08:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:51 -0500
commit9a97fb7ff393be213b971bca5ed6fda930ac96ea (patch)
treef356a15164553794c301b9e5d7bc89d274468fe3 /source3/nsswitch
parent2349acdd4366f665b9091d879682bc578b03c42d (diff)
downloadsamba-9a97fb7ff393be213b971bca5ed6fda930ac96ea.tar.gz
samba-9a97fb7ff393be213b971bca5ed6fda930ac96ea.tar.bz2
samba-9a97fb7ff393be213b971bca5ed6fda930ac96ea.zip
r23974: Fix Coverity ID 361. num_rids == 0 is caught on function entry
(This used to be commit 839d64add4ebf900863f1ed3e7a379db9b6fdf69)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_client.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 3926a218e9..59664e0719 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -145,7 +145,7 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
"%ld\n", rids[i]);
}
- if ((num_rids != 0) && (ridlist == NULL)) {
+ if (ridlist == NULL) {
return False;
}
@@ -163,16 +163,11 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
*domain_name = talloc_strdup(mem_ctx, response.data.domain_name);
- if (num_rids) {
- *names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
- *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, 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;
- }
- } else {
- *names = NULL;
- *types = NULL;
+ if ((*names == NULL) || (*types == NULL)) {
+ goto fail;
}
p = (char *)response.extra_data.data;