From: Nico Weber Date: Thu, 24 Apr 2014 19:52:12 +0000 (+0000) Subject: MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57218ee935e495ef17164e7f6580777e1a376430;p=clang 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 --- 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);