summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_fork.c12
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)