Fixing memory leak

llvm-svn: 237072
This commit is contained in:
Andrew Kaylor 2015-05-12 00:13:51 +00:00
parent 5eaf3815c0
commit 0ddaf2bfb9
1 changed files with 2 additions and 0 deletions

View 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.