From 1a6aaee0507fbcd3abc2bdaad55cf5c4a6ff0e05 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 26 Jul 2009 15:38:10 +0200 Subject: Fix a valgrind error in _samr_DeleteUser The close_handle invalidates uinfo --- source3/rpc_server/srv_samr_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_samr_nt.c') diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index b27603f2615..2dcf360daf7 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -5694,13 +5694,13 @@ NTSTATUS _samr_DeleteUser(pipes_struct *p, TALLOC_FREE(sam_pass); + force_flush_samr_cache(&uinfo->sid); + if (!close_policy_hnd(p, r->in.user_handle)) return NT_STATUS_OBJECT_NAME_INVALID; ZERO_STRUCTP(r->out.user_handle); - force_flush_samr_cache(&uinfo->sid); - return NT_STATUS_OK; } -- cgit