diff --git a/src/mem/mem_ctrl.cc b/src/mem/mem_ctrl.cc index 8eec9c8eab..58ccd179e4 100644 --- a/src/mem/mem_ctrl.cc +++ b/src/mem/mem_ctrl.cc @@ -520,7 +520,6 @@ MemCtrl::processRespondEvent() accessAndRespond(mem_pkt->pkt, frontendLatency + backendLatency); } - delete respQueue.front(); respQueue.pop_front(); if (!respQueue.empty()) { @@ -543,6 +542,8 @@ MemCtrl::processRespondEvent() } } + delete mem_pkt; + // We have made a location in the queue available at this point, // so if there is a read that was forced to wait, retry now if (retryRdReq) {