summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_samr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index f985ee9979..e5e67f39dc 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -865,6 +865,12 @@ NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
*num_mem = r.num_sids;
+ if (*num_mem == 0) {
+ *sids = NULL;
+ result = NT_STATUS_OK;
+ goto done;
+ }
+
if (!(*sids = talloc(mem_ctx, sizeof(DOM_SID) * *num_mem))) {
result = NT_STATUS_UNSUCCESSFUL;
goto done;