From 0ddaf2bfb9a8b4ffba4e3ecf093b528ab1929791 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Tue, 12 May 2015 00:13:51 +0000 Subject: [PATCH] Fixing memory leak llvm-svn: 237072 --- llvm/lib/CodeGen/WinEHPrepare.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index c56a779255fc..2cebb1d40cf9 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -882,7 +882,9 @@ bool WinEHPrepare::prepareExceptionHandlers( Function *Handler = cast(CA->getHandlerBlockOrFunc()); getPossibleReturnTargets(&F, Handler, ReturnTargets); } + delete Action; } + ActionList.clear(); for (BasicBlock *Target : ReturnTargets) { Branch->addDestination(Target); // The target may be a block that we excepted to get pruned.