summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_spawn_native_process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_spawn_native_process.c b/src/process/ntapi_tt_spawn_native_process.c
index ebc2c06..db308d6 100644
--- a/src/process/ntapi_tt_spawn_native_process.c
+++ b/src/process/ntapi_tt_spawn_native_process.c
@@ -240,6 +240,10 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
return __tt_spawn_return(
&rtblock,0,0,status);
+ /* tidy up */
+ if (!sparams->himage)
+ __ntapi->zw_close(hfile);
+
/* tty session (optional) */
if (sparams->hsession) {
if ((status = __ntapi->tty_client_process_register(