Fix a memory leak. Hopefully this fixes the longer running benchmarks.
authorKevin Lim <ktlim@umich.edu>
Tue, 3 Apr 2007 18:25:24 +0000 (14:25 -0400)
committerKevin Lim <ktlim@umich.edu>
Tue, 3 Apr 2007 18:25:24 +0000 (14:25 -0400)
--HG--
extra : convert_revision : 89eff82642ff181a9b95c77c4d2bf620ca837113

src/cpu/o3/lsq_unit_impl.hh

index 0a30210469acd0c9754d9ffa49484bea2e290157..49314491923d694a7474ae554a487802b962dee2 100644 (file)
@@ -57,6 +57,11 @@ LSQUnit<Impl>::WritebackEvent::process()
     if (!lsqPtr->isSwitchedOut()) {
         lsqPtr->writeback(inst, pkt);
     }
+
+    if (pkt->senderState)
+        delete pkt->senderState;
+
+    delete pkt->req;
     delete pkt;
 }
 
@@ -80,10 +85,6 @@ LSQUnit<Impl>::completeDataAccess(PacketPtr pkt)
 
     if (isSwitchedOut() || inst->isSquashed()) {
         iewStage->decrWb(inst->seqNum);
-        delete state;
-        delete pkt->req;
-        delete pkt;
-        return;
     } else {
         if (!state->noWB) {
             writeback(inst, pkt);