diff options
author | midipix <writeonce@midipix.org> | 2016-07-30 04:21:39 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-07-30 13:41:38 -0400 |
commit | 8d87a04ec0ac1e0e3fe98be4c2513b6c48453b49 (patch) | |
tree | fb34d60c473b30e24858746f0610c7dd23e64955 | |
parent | 875bdceedecf515ed18679d3e325847daaedf852 (diff) | |
download | ntapi-8d87a04ec0ac1e0e3fe98be4c2513b6c48453b49.tar.bz2 ntapi-8d87a04ec0ac1e0e3fe98be4c2513b6c48453b49.tar.xz |
debug: __ntapi_tt_wait_for_dummy_event(): fix logic, properly close hevent.
-rw-r--r-- | src/sync/ntapi_tt_wait_for_dummy_event.c | 9 |
1 files 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; } |