From 57218ee935e495ef17164e7f6580777e1a376430 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 24 Apr 2014 19:52:12 +0000 Subject: [PATCH] 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 --- lib/AST/VTableBuilder.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.40.0