Fix an et-forest memory leak. Patch by Daniel Berlin.
authorChris Lattner <sabre@nondot.org>
Tue, 14 Mar 2006 19:41:45 +0000 (19:41 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Mar 2006 19:41:45 +0000 (19:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26763 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Dominators.cpp

index 951da55589ff87317b14b18843dab6606135946d..24b3e87cafd9c73abf17dc67068565ea46a87275 100644 (file)
@@ -682,6 +682,7 @@ void ETNode::setFather(ETNode *NewFather) {
     rightmost->MinOccurrence = NewFatherOcc->MinOccurrence;
   }
 
+  delete ParentOcc;
   ParentOcc = NewFatherOcc;
 
   // Update *our* tree