diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/process/ntapi_tt_fork.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/process/ntapi_tt_fork.c b/src/process/ntapi_tt_fork.c index 20c7c25..b7a7a20 100644 --- a/src/process/ntapi_tt_fork.c +++ b/src/process/ntapi_tt_fork.c @@ -301,11 +301,15 @@ int32_t __fastcall __ntapi_tt_fork( NT_EVENT_NOT_SIGNALED))) return status; - if ((status = __ntapi->tt_create_inheritable_event( - &hready, - NT_NOTIFICATION_EVENT, - NT_EVENT_NOT_SIGNALED))) + status = __ntapi->tt_create_inheritable_event( + &hready, + NT_NOTIFICATION_EVENT, + NT_EVENT_NOT_SIGNALED); + + if (status) { + __ntapi->zw_close(hresumed); return status; + } for (i=0; i<32; i++) { if (__ntapi->zw_create_user_process) |