diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-05-25 14:41:36 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-05-25 14:41:36 -0400 |
commit | 02aa549c9b1fd81be4bb1408cb97b92dc126e360 (patch) | |
tree | d461a416b8734181e58f92d71adf83657b2f6369 /cpu | |
parent | 32509d83878816cd870cea1ccbb8a9eb46a1e3f6 (diff) | |
download | gem5-02aa549c9b1fd81be4bb1408cb97b92dc126e360.tar.xz |
Fix minor memory leak.
--HG--
extra : convert_revision : aa222dd95d833b16b0f474ec156bd6955c2c54c6
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/o3/lsq_unit_impl.hh | 10 |
1 files 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<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); } |