From d7b7ef4a3375cd3302fbab4c208e3dddc4e4a037 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 4 Aug 2007 10:18:33 +0000 Subject: r24165: Fix Coverity ID 369. This was not really a bug I think, but this change cleans up the code a bit. (This used to be commit 59b4914df3ecc97a1c629e8c7a066aed8e8d9226) --- source3/rpc_server/srv_lsa_nt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 1f9c245723..40d5005c4f 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1517,16 +1517,16 @@ NTSTATUS _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENU SAFE_FREE(sid_list); return NT_STATUS_NO_MEMORY; } + + for (i = q_u->enum_context, j = 0; i < num_entries; i++, j++) { + init_dom_sid2(&(*sids).sid[j], &sid_list[i]); + (*sids).ptr_sid[j] = 1; + } } else { sids->ptr_sid = NULL; sids->sid = NULL; } - for (i = q_u->enum_context, j = 0; i < num_entries; i++, j++) { - init_dom_sid2(&(*sids).sid[j], &sid_list[i]); - (*sids).ptr_sid[j] = 1; - } - talloc_free(sid_list); init_lsa_r_enum_accounts(r_u, num_entries); -- cgit