Fix minor memory leak.
authorKevin Lim <ktlim@umich.edu>
Thu, 25 May 2006 18:41:36 +0000 (14:41 -0400)
committerKevin Lim <ktlim@umich.edu>
Thu, 25 May 2006 18:41:36 +0000 (14:41 -0400)
--HG--
extra : convert_revision : aa222dd95d833b16b0f474ec156bd6955c2c54c6

cpu/o3/lsq_unit_impl.hh

index 7974ddaadcb9e68b65c73d5c8d6d083151df9e90..10f2b557274b28ce7c967e301ed35f6bb579c04f 100644 (file)
@@ -51,12 +51,18 @@ LSQUnit<Impl>::StoreCompletionEvent::process()
 
     //lsqPtr->removeMSHR(lsqPtr->storeQueue[storeIdx].inst->seqNum);
 
-    if (lsqPtr->isSwitchedOut())
+    if (lsqPtr->isSwitchedOut()) {
+        if (wbEvent)
+            delete wbEvent;
+
         return;
+    }
 
     lsqPtr->cpu->wakeCPU();
-    if (wbEvent)
+    if (wbEvent) {
         wbEvent->process();
+        delete wbEvent;
+    }
     lsqPtr->completeStore(storeIdx);
 }