From 02aa549c9b1fd81be4bb1408cb97b92dc126e360 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Thu, 25 May 2006 14:41:36 -0400 Subject: Fix minor memory leak. --HG-- extra : convert_revision : aa222dd95d833b16b0f474ec156bd6955c2c54c6 --- cpu/o3/lsq_unit_impl.hh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cpu/o3/lsq_unit_impl.hh b/cpu/o3/lsq_unit_impl.hh index 7974ddaad..10f2b5572 100644 --- a/cpu/o3/lsq_unit_impl.hh +++ b/cpu/o3/lsq_unit_impl.hh @@ -51,12 +51,18 @@ LSQUnit::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); } -- cgit v1.2.3