summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-03 10:37:26 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-03 10:52:36 (GMT)
commit407ff47eca85c6d73c9cefee0d1b0afef41e0b19 (patch)
tree376acbc6c437fa6217af70ce66051d3f9e5a9e84 /Source/cmTarget.cxx
parentcf74fc24d4e2b2910921323ea1862bc234919585 (diff)
downloadCMake-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.cxx1
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(