mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 01:12:25 +00:00
server: Unconditionally close APC handle in get_apc_result call.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
51d17bfd2f
commit
23cdc7e529
@ -677,7 +677,6 @@ unsigned int server_queue_process_apc( HANDLE process, const apc_call_t *call, a
|
||||
SERVER_END_REQ;
|
||||
|
||||
if (!ret && result->type == APC_NONE) continue; /* APC didn't run, try again */
|
||||
if (ret) NtClose( handle );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1602,13 +1602,12 @@ DECL_HANDLER(get_apc_result)
|
||||
|
||||
if (!(apc = (struct thread_apc *)get_handle_obj( current->process, req->handle,
|
||||
0, &thread_apc_ops ))) return;
|
||||
if (!apc->executed) set_error( STATUS_PENDING );
|
||||
else
|
||||
{
|
||||
reply->result = apc->result;
|
||||
/* close the handle directly to avoid an extra round-trip */
|
||||
close_handle( current->process, req->handle );
|
||||
}
|
||||
|
||||
if (apc->executed) reply->result = apc->result;
|
||||
else set_error( STATUS_PENDING );
|
||||
|
||||
/* close the handle directly to avoid an extra round-trip */
|
||||
close_handle( current->process, req->handle );
|
||||
release_object( apc );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user