summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index f69e6d1452..4eb5c88646 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -2162,6 +2162,9 @@ static NTSTATUS samr_GetMembersInAlias(struct dcesrv_call_state *dce_call, TALLO
if (ret != 1)
return NT_STATUS_INTERNAL_DB_CORRUPTION;
+ r->out.sids->num_sids = 0;
+ r->out.sids->sids = NULL;
+
el = ldb_msg_find_element(msgs[0], "member");
if (el != NULL) {
@@ -2188,11 +2191,10 @@ static NTSTATUS samr_GetMembersInAlias(struct dcesrv_call_state *dce_call, TALLO
if (sids[i].sid == NULL)
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
+ r->out.sids->num_sids = el->num_values;
+ r->out.sids->sids = sids;
}
- r->out.sids->num_sids = el->num_values;
- r->out.sids->sids = sids;
-
return NT_STATUS_OK;
}