mem: Fix memory leak in handling of deferred snoops
mem: Fix memory leak in handling of deferred snoops

This patch fixes a memory leak where deferred snoop packets never got
deallocated. On the call to MSHR::handleSnoop these snoops were
treated as if a response will be sent, as the MSHR was
pendingModified. Consequently, a copy of the packet was created and
added to the MSHR targets. However, an preceeding target to the same
MSHR, originally from a CPU, was serviced before the snoop, and caused
the block to be invalidated. This happens for ReadExReq and
UpgradeReq.

Note that the original snoop will receive a response, just not from
the cache in question, but instead from the cache upstream that issued
the ReadExReq or UpgradeReq.

Change-Id: I4ac012fbc8a46cf693ca390fe9476105d444e6f4
Reviewed-by: Nikos Nikoleris <b6a1b3cd9d36c44e9eeb16bc870df3cb2a0cf469@arm.com>

qizenguf/MLC-STT,rallylee/gem5,briancoutinho0905/2dsampling,HwisooSo/gemV-update,rjschof/gem5,gem5/gem5,rallylee/gem5,rallylee/gem5,cancro7/gem5,TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,sobercoder/gem5,sobercoder/gem5,aclifton/cpeg853-gem5,aclifton/cpeg853-gem5,KuroeKurose/gem5,sobercoder/gem5,briancoutinho0905/2dsampling,SanchayanMaity/gem5,rallylee/gem5,sobercoder/gem5,rjschof/gem5,gedare/gem5,TUD-OS/gem5-dtu,SanchayanMaity/gem5,sobercoder/gem5,rallylee/gem5,cancro7/gem5,gedare/gem5,qizenguf/MLC-STT,gedare/gem5,Weil0ng/gem5,gem5/gem5,rjschof/gem5,powerjg/gem5-ci-test,cancro7/gem5,gem5/gem5,powerjg/gem5-ci-test,powerjg/gem5-ci-test,KuroeKurose/gem5,KuroeKurose/gem5,TUD-OS/gem5-dtu,gedare/gem5,gem5/gem5,qizenguf/MLC-STT,briancoutinho0905/2dsampling,aclifton/cpeg853-gem5,aclifton/cpeg853-gem5,gem5/gem5,HwisooSo/gemV-update,SanchayanMaity/gem5,sobercoder/gem5,TUD-OS/gem5-dtu,aclifton/cpeg853-gem5,Weil0ng/gem5,cancro7/gem5,qizenguf/MLC-STT,KuroeKurose/gem5,powerjg/gem5-ci-test,briancoutinho0905/2dsampling,KuroeKurose/gem5,HwisooSo/gemV-update,Weil0ng/gem5,TUD-OS/gem5-dtu,rallylee/gem5,briancoutinho0905/2dsampling,qizenguf/MLC-STT,SanchayanMaity/gem5,sobercoder/gem5,SanchayanMaity/gem5,rjschof/gem5,cancro7/gem5,HwisooSo/gemV-update,powerjg/gem5-ci-test,Weil0ng/gem5,Weil0ng/gem5,cancro7/gem5,qizenguf/MLC-STT,HwisooSo/gemV-update,briancoutinho0905/2dsampling,SanchayanMaity/gem5,aclifton/cpeg853-gem5,HwisooSo/gemV-update,HwisooSo/gemV-update,Weil0ng/gem5,Weil0ng/gem5,cancro7/gem5,rjschof/gem5,qizenguf/MLC-STT,KuroeKurose/gem5,powerjg/gem5-ci-test,briancoutinho0905/2dsampling,rjschof/gem5,aclifton/cpeg853-gem5,rjschof/gem5,KuroeKurose/gem5,TUD-OS/gem5-dtu,SanchayanMaity/gem5,powerjg/gem5-ci-test,gedare/gem5,gedare/gem5,rallylee/gem5,gem5/gem5,gedare/gem5