aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-05-21 16:00:02 +0000
committerTed Kremenek <kremenek@apple.com>2008-05-21 16:00:02 +0000
commit936ff132a9aba1f1bb5d72a5744da1e10ce269d2 (patch)
tree39be7d09a012a13671986519da8306c9fa8d3665 /lib/AST/Stmt.cpp
parent6cc189648ade1d1c838f6bf22ffa0016d56393d3 (diff)
Fix potential double-free.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r--lib/AST/Stmt.cpp2
1 files changed, 1 insertions, 1 deletions
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() {