diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index b29e4e3605..9d76dd49be 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -363,7 +363,11 @@ void cmCTestMultiProcessHandler::ReadCostData() cmSystemTools::SplitString(line.c_str(), ' '); // Probably an older version of the file, will be fixed next run - if(parts.size() < 3) return; + if(parts.size() < 3) + { + fin.close(); + return; + } std::string name = parts[0]; int prev = atoi(parts[1].c_str());