mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
winbindd: Ensure we do not look at rid_array before checking if it was returned
We no longer return early if there are no members, we just return an empty array. Change-Id: I7b0949e0c0b9277426a8007514a8658615f6c709 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
committed by
David Disseldorp
parent
8d28437318
commit
95e0d759ac
@ -580,8 +580,6 @@ NTSTATUS rpc_lookup_usergroups(TALLOC_CTX *mem_ctx,
|
||||
&user_policy,
|
||||
&rid_array,
|
||||
&result);
|
||||
num_groups = rid_array->count;
|
||||
|
||||
{
|
||||
NTSTATUS _result;
|
||||
dcerpc_samr_Close(b, mem_ctx, &user_policy, &_result);
|
||||
@ -590,10 +588,12 @@ NTSTATUS rpc_lookup_usergroups(TALLOC_CTX *mem_ctx,
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(result) || num_groups == 0) {
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
num_groups = rid_array->count;
|
||||
|
||||
user_grpsids = talloc_array(mem_ctx, struct dom_sid, num_groups);
|
||||
if (user_grpsids == NULL) {
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
|
Reference in New Issue
Block a user