From: Ted Kremenek Date: Wed, 21 May 2008 16:00:02 +0000 (+0000) Subject: Fix potential double-free. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=936ff132a9aba1f1bb5d72a5744da1e10ce269d2;p=clang Fix potential double-free. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51381 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index b12518fa78..6d8ebcf864 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -57,7 +57,7 @@ void Stmt::Destroy(ASTContext& C) { void DeclStmt::Destroy(ASTContext& C) { TheDecl->Destroy(C); - Stmt::Destroy(C); + delete this; } void Stmt::PrintStats() {