BUG: fix leak

This commit is contained in:
Bill Hoffman 2004-01-21 14:27:01 -05:00
parent cb95dde1e4
commit d72f5a0be0
1 changed files with 6 additions and 3 deletions

View File

@ -3781,7 +3781,12 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
if(cmakeAndTest)
{
return this->RunCMakeAndTest(output);
cmSystemTools::ResetErrorOccuredFlag();
cmListFileCache::GetInstance()->ClearCache();
int retv = this->RunCMakeAndTest(output);
cmSystemTools::ResetErrorOccuredFlag();
cmListFileCache::GetInstance()->ClearCache();
return retv;
}
int res;
@ -3865,8 +3870,6 @@ void CMakeStdoutCallback(const char* m, int len, void* s)
int cmCTest::RunCMakeAndTest(std::string* outstring)
{
unsigned int k;
cmSystemTools::ResetErrorOccuredFlag();
cmListFileCache::GetInstance()->ClearCache();
std::string cmakeOutString;
cmSystemTools::SetErrorCallback(CMakeMessageCallback, &cmakeOutString);
cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString);