From 1c8129795ac482b36a67d0b7131f2bbd6ad04a54 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 16 Dec 2014 13:47:35 -0500 Subject: ctest_memcheck: Do not open empty BC output file name In cmCTestMemCheckHandler::PostProcessBoundsCheckerTest return early if the output file name is empty. We already do this in the similar cmCTestMemCheckHandler::AppendMemTesterOutput method. --- Source/CTest/cmCTestMemCheckHandler.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 089e84b..09cf760 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -1202,6 +1202,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res, return; } std::string ofile = files[0]; + if ( ofile.empty() ) + { + return; + } // put a scope around this to close ifs so the file can be removed { cmsys::ifstream ifs(ofile.c_str()); -- cgit v0.12