diff options
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 656b3cefb..58f40ce4a 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -598,7 +598,8 @@ dll_crt0_1 () ProtectHandle (child_proc_info->forker_finished); break; case PROC_SPAWN: - CloseHandle (spawn_info->hexec_proc); + if (spawn_info->hexec_proc) + CloseHandle (spawn_info->hexec_proc); goto around; case PROC_EXEC: hexec_proc = spawn_info->hexec_proc; |