cmTarget: Fix memory leak when SOURCES property is cleared

This commit is contained in:
Brad King 2015-09-03 06:37:26 -04:00
parent cf74fc24d4
commit 407ff47eca
1 changed files with 1 additions and 0 deletions

View File

@ -1671,6 +1671,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
this->Internal->SourceFilesMap.clear();
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
cmGeneratorExpression ge(lfbt);
cmDeleteAll(this->Internal->SourceEntries);
this->Internal->SourceEntries.clear();
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
this->Internal->SourceEntries.push_back(