Fix memory and process leak in ctest_run_script.

This commit is contained in:
Bill Hoffman 2009-09-04 17:01:47 -04:00
parent 0b49e4ad1e
commit cdb966532b
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,6 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
// Properly handle output of the build command
cmsysProcess_WaitForExit(cp, 0);
int result = cmsysProcess_GetState(cp);
int retVal = 0;
bool failed = false;
if(result == cmsysProcess_State_Exited)
@ -300,6 +299,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
<< cmsysProcess_GetErrorString(cp) << std::endl);
failed = true;
}
cmsysProcess_Delete(cp);
if(failed)
{
cmOStringStream message;