From 8d87a04ec0ac1e0e3fe98be4c2513b6c48453b49 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 30 Jul 2016 04:21:39 -0400 Subject: debug: __ntapi_tt_wait_for_dummy_event(): fix logic, properly close hevent. --- src/sync/ntapi_tt_wait_for_dummy_event.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sync/ntapi_tt_wait_for_dummy_event.c b/src/sync/ntapi_tt_wait_for_dummy_event.c index 16f9823..376cf99 100644 --- a/src/sync/ntapi_tt_wait_for_dummy_event.c +++ b/src/sync/ntapi_tt_wait_for_dummy_event.c @@ -17,15 +17,14 @@ int32_t __stdcall __ntapi_tt_wait_for_dummy_event(void) int32_t status; void * hevent; - status = __ntapi->tt_create_inheritable_event( + if ((status = __ntapi->tt_create_private_event( &hevent, NT_NOTIFICATION_EVENT, - NT_EVENT_NOT_SIGNALED); - - if (status != NT_STATUS_SUCCESS) + NT_EVENT_NOT_SIGNALED))) return status; - return __ntapi->zw_wait_for_single_object(hevent,0,0); + status = __ntapi->zw_wait_for_single_object(hevent,0,0); + __ntapi->zw_close(hevent); return status; } -- cgit v1.2.3