BUG: fix leak
This commit is contained in:
parent
cb95dde1e4
commit
d72f5a0be0
|
@ -3781,7 +3781,12 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
|
||||||
|
|
||||||
if(cmakeAndTest)
|
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;
|
int res;
|
||||||
|
@ -3865,8 +3870,6 @@ void CMakeStdoutCallback(const char* m, int len, void* s)
|
||||||
int cmCTest::RunCMakeAndTest(std::string* outstring)
|
int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
{
|
{
|
||||||
unsigned int k;
|
unsigned int k;
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
|
||||||
cmListFileCache::GetInstance()->ClearCache();
|
|
||||||
std::string cmakeOutString;
|
std::string cmakeOutString;
|
||||||
cmSystemTools::SetErrorCallback(CMakeMessageCallback, &cmakeOutString);
|
cmSystemTools::SetErrorCallback(CMakeMessageCallback, &cmakeOutString);
|
||||||
cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString);
|
cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString);
|
||||||
|
|
Loading…
Reference in New Issue