diff options
author | Brad King <brad.king@kitware.com> | 2015-09-03 10:37:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-03 10:52:36 (GMT) |
commit | 407ff47eca85c6d73c9cefee0d1b0afef41e0b19 (patch) | |
tree | 376acbc6c437fa6217af70ce66051d3f9e5a9e84 /Source/cmTarget.cxx | |
parent | cf74fc24d4e2b2910921323ea1862bc234919585 (diff) | |
download | CMake-407ff47eca85c6d73c9cefee0d1b0afef41e0b19.zip CMake-407ff47eca85c6d73c9cefee0d1b0afef41e0b19.tar.gz CMake-407ff47eca85c6d73c9cefee0d1b0afef41e0b19.tar.bz2 |
cmTarget: Fix memory leak when SOURCES property is cleared
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 396715d..3425f34 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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( |