diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-07-29 09:23:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:01 -0500 |
commit | d5ca533043cbcd69b08fd7b950891f4ea67cb9a6 (patch) | |
tree | 23c7f9f3856867d036ba525254f451e46a7bc34b /source3/rpcclient | |
parent | 84058d493355927cd884d1a8848a4497a473db2a (diff) | |
download | samba-d5ca533043cbcd69b08fd7b950891f4ea67cb9a6.tar.gz samba-d5ca533043cbcd69b08fd7b950891f4ea67cb9a6.tar.bz2 samba-d5ca533043cbcd69b08fd7b950891f4ea67cb9a6.zip |
r24068: Fix Coverity id 366 (dead code). We have checked for argc >= 3 above.
(This used to be commit b876bca6bcdb091c4f4f11af3bd758c8ce4db50a)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 2a35b0cf19..b5ccab8886 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -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++) |