[cfe-commits] r112006 - /cfe/trunk/lib/AST/RecordLayout.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Aug 24 17:32:20 PDT 2010
Author: akirtzidis
Date: Tue Aug 24 19:32:19 2010
New Revision: 112006
URL: http://llvm.org/viewvc/llvm-project?rev=112006&view=rev
Log:
Plug leak. The DenseMaps of CXXRecordLayoutInfo weren't freed.
Modified:
cfe/trunk/lib/AST/RecordLayout.cpp
Modified: cfe/trunk/lib/AST/RecordLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayout.cpp?rev=112006&r1=112005&r2=112006&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayout.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayout.cpp Tue Aug 24 19:32:19 2010
@@ -19,8 +19,10 @@
void ASTRecordLayout::Destroy(ASTContext &Ctx) {
if (FieldOffsets)
Ctx.Deallocate(FieldOffsets);
- if (CXXInfo)
+ if (CXXInfo) {
Ctx.Deallocate(CXXInfo);
+ CXXInfo->~CXXRecordLayoutInfo();
+ }
this->~ASTRecordLayout();
Ctx.Deallocate(this);
}
More information about the cfe-commits
mailing list