summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-09-04 21:01:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-09-04 21:01:47 (GMT)
commitcdb966532b8578a7389f91dc8e805f1040692f2f (patch)
tree769870c79ec39d6a7207e363bd17d02754843e76 /Source/CTest
parent0b49e4ad1e0531755349b3ddb172305787f3f614 (diff)
downloadCMake-cdb966532b8578a7389f91dc8e805f1040692f2f.zip
CMake-cdb966532b8578a7389f91dc8e805f1040692f2f.tar.gz
CMake-cdb966532b8578a7389f91dc8e805f1040692f2f.tar.bz2
Fix memory and process leak in ctest_run_script.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 0c292e5..569b291 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -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;