* spawn.cc (spawn_guts): Fix potential handle leak when failing exec.

This commit is contained in:
Christopher Faylor
2006-01-27 06:08:05 +00:00
parent e1bfb483ea
commit e7a9c71d62
2 changed files with 6 additions and 1 deletions

View File

@@ -731,7 +731,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
myself->exec_sendsig = NULL;
}
res = -1;
CloseHandle (moreinfo->myself_pinfo);
if (moreinfo->myself_pinfo)
CloseHandle (moreinfo->myself_pinfo);
goto out;
}