summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/RecordLayout.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-25 00:32:19 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-25 00:32:19 +0000
commit96dbfa2e650437c1c219779ae80697d506a07511 (patch)
treeafb23893280133c96486ba6512963f9e2bfb4519 /clang/lib/AST/RecordLayout.cpp
parent3c6cd17c8a4d4e012bf0f4abe54f04e69ef4a0dd (diff)
Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
llvm-svn: 112006
Diffstat (limited to 'clang/lib/AST/RecordLayout.cpp')
-rw-r--r--clang/lib/AST/RecordLayout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/RecordLayout.cpp b/clang/lib/AST/RecordLayout.cpp
index 262c4597f846..4d9c51633626 100644
--- a/clang/lib/AST/RecordLayout.cpp
+++ b/clang/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);
}