aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-04-24 19:52:12 +0000
committerNico Weber <nicolasweber@gmx.de>2014-04-24 19:52:12 +0000
commit57218ee935e495ef17164e7f6580777e1a376430 (patch)
tree05f4b0332e4343b879b66e32516b6e35a627c82f
parentb7ed4eee859bb58828f89c1fb02e440e9ee8c475 (diff)
downloadclang_35a-57218ee935e495ef17164e7f6580777e1a376430.tar.gz
MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207138 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/VTableBuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/VTableBuilder.cpp b/lib/AST/VTableBuilder.cpp
index c018f1b303..b45f2aa252 100644
--- a/lib/AST/VTableBuilder.cpp
+++ b/lib/AST/VTableBuilder.cpp
@@ -3274,6 +3274,8 @@ static bool rebucketPaths(VPtrInfoVector &Paths) {
}
MicrosoftVTableContext::~MicrosoftVTableContext() {
+ for (auto &P : VFPtrLocations)
+ llvm::DeleteContainerPointers(*P.second);
llvm::DeleteContainerSeconds(VFPtrLocations);
llvm::DeleteContainerSeconds(VFTableLayouts);
llvm::DeleteContainerSeconds(VBaseInfo);