Fixing a memory leak in WinEHPrepare
authorAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 3 Apr 2015 21:44:17 +0000 (21:44 +0000)
committerAndrew Kaylor <andrew.kaylor@intel.com>
Fri, 3 Apr 2015 21:44:17 +0000 (21:44 +0000)
llvm-svn: 234059

llvm/lib/CodeGen/WinEHPrepare.cpp

index 2601d7a..d030a7d 100644 (file)
@@ -733,6 +733,8 @@ void WinEHPrepare::completeNestedLandingPad(Function *ParentFn,
       ActionTargets.push_back(NewBA);
     }
   }
+  DeleteContainerPointers(ActionList);
+  ActionList.clear();
   OutlinedBB->getInstList().push_back(EHActions);
 
   // Insert an indirect branch into the outlined landing pad BB.