diff options
-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++) |