OSDN Git Service

Fixing memory leak
authorAndrew Kaylor <andrew.kaylor@intel.com>
Tue, 12 May 2015 00:13:51 +0000 (00:13 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Tue, 12 May 2015 00:13:51 +0000 (00:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237072 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/WinEHPrepare.cpp

index c56a779..2cebb1d 100644 (file)
@@ -882,7 +882,9 @@ bool WinEHPrepare::prepareExceptionHandlers(
         Function *Handler = cast<Function>(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.