From 407ff47eca85c6d73c9cefee0d1b0afef41e0b19 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 3 Sep 2015 06:37:26 -0400 Subject: cmTarget: Fix memory leak when SOURCES property is cleared --- Source/cmTarget.cxx | 1 + 1 file changed, 1 insertion(+) 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 cge = ge.Parse(value); this->Internal->SourceEntries.push_back( -- cgit v0.12