mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r24068: Fix Coverity id 366 (dead code). We have checked for argc >= 3 above.
This commit is contained in:
parent
411a1a2037
commit
b876bca6bc
@ -1873,15 +1873,12 @@ static NTSTATUS cmd_samr_lookup_rids(struct rpc_pipe_client *cli,
|
||||
/* Look up rids */
|
||||
|
||||
num_rids = argc - 2;
|
||||
if (num_rids) {
|
||||
if ((rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids)) == NULL) {
|
||||
rpccli_samr_close(cli, mem_ctx, &domain_pol);
|
||||
rpccli_samr_close(cli, mem_ctx, &connect_pol);
|
||||
result = NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
rids = NULL;
|
||||
|
||||
if ((rids = TALLOC_ARRAY(mem_ctx, uint32, num_rids)) == NULL) {
|
||||
rpccli_samr_close(cli, mem_ctx, &domain_pol);
|
||||
rpccli_samr_close(cli, mem_ctx, &connect_pol);
|
||||
result = NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (i = 0; i < argc - 2; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user