From 42f81e674ba420406d9efb8b52d4e59e613ebcea Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Wed, 25 Aug 2010 00:32:19 +0000 Subject: [PATCH] Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112006 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/RecordLayout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/AST/RecordLayout.cpp b/lib/AST/RecordLayout.cpp index 262c4597f8..4d9c516336 100644 --- a/lib/AST/RecordLayout.cpp +++ b/lib/AST/RecordLayout.cpp @@ -19,8 +19,10 @@ using namespace clang; void ASTRecordLayout::Destroy(ASTContext &Ctx) { if (FieldOffsets) Ctx.Deallocate(FieldOffsets); - if (CXXInfo) + if (CXXInfo) { Ctx.Deallocate(CXXInfo); + CXXInfo->~CXXRecordLayoutInfo(); + } this->~ASTRecordLayout(); Ctx.Deallocate(this); }