mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r23974: Fix Coverity ID 361. num_rids == 0 is caught on function entry
This commit is contained in:
parent
4cada7c148
commit
839d64add4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user