]> granicus.if.org Git - clang/commitdiff
Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 25 Aug 2010 00:32:19 +0000 (00:32 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 25 Aug 2010 00:32:19 +0000 (00:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112006 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayout.cpp

index 262c4597f8468831973e328311dbd5225cd1607e..4d9c516336267045c9ce6bcb8f54e92e22b40239 100644 (file)
@@ -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);
 }