summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2011-09-01 19:56:53 (GMT)
committerBrad King <brad.king@kitware.com>2011-09-02 15:15:11 (GMT)
commitf47393c66bb1810a9916fa755bc5830fb9d24d63 (patch)
treeff2d5909429735a90581efc3f4e4221fa5f89e36 /Source/CTest/cmCTestRunTest.cxx
parent83ce7c4d3cbc8b4277e815f861456ea6f7ec18e3 (diff)
downloadCMake-f47393c66bb1810a9916fa755bc5830fb9d24d63.zip
CMake-f47393c66bb1810a9916fa755bc5830fb9d24d63.tar.gz
CMake-f47393c66bb1810a9916fa755bc5830fb9d24d63.tar.bz2
CTest: Fix memory leaks on error
Credit goes to "cppcheck". Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 60695da..81f18b0 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -93,6 +93,7 @@ void cmCTestRunTest::CompressOutput()
ret = deflateInit(&strm, -1); //default compression level
if (ret != Z_OK)
{
+ delete[] out;
return;
}
@@ -106,6 +107,7 @@ void cmCTestRunTest::CompressOutput()
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error during output "
"compression. Sending uncompressed output." << std::endl);
+ delete[] out;
return;
}