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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234059 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/WinEHPrepare.cpp

index 2601d7a98be913e546311cc6c3293ba138f6d632..d030a7d44cd5f3864777ebd39c3b1de8181b899d 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.