Eliminate a memory leak.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 31 May 2006 07:13:03 +0000 (07:13 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 31 May 2006 07:13:03 +0000 (07:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28585 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

index cfe5e6b0767d91711e2bf0e261ecc5ffb3a1dcbd..d2820d9632392b8b38ba99bc1c2d546b39065e13 100644 (file)
@@ -402,6 +402,7 @@ void ScheduleDAG::EmitNode(SDNode *Node,
         DEBUG(std::cerr << "Sched: COMMUTING FAILED!\n");
       else {
         DEBUG(std::cerr << "Sched: COMMUTED TO: " << *NewMI);
+        delete MI;
         MI = NewMI;
       }
     }