diff options
author | Mitch Hayenga <mitch.hayenga+gem5@gmail.com> | 2013-01-08 08:54:06 -0500 |
---|---|---|
committer | Mitch Hayenga <mitch.hayenga+gem5@gmail.com> | 2013-01-08 08:54:06 -0500 |
commit | dc4a0aa2fa1bc3767785b552159ab0ebe5baa72e (patch) | |
tree | 653944fd5d2938c2a0684a209a6a18534504d0d6 /src | |
parent | 8480615d8d148ad81ac6242a96edf77293c93078 (diff) | |
download | gem5-dc4a0aa2fa1bc3767785b552159ab0ebe5baa72e.tar.xz |
mem: Fix use-after-free bug
Running with valgrind I noticed a use after free originating from
simple_mem.cc. It looks like this is a known issue and this additional call
site was missed in an earlier patch.
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/simple_mem.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/simple_mem.cc b/src/mem/simple_mem.cc index d3a53a26f..7dd0fd101 100644 --- a/src/mem/simple_mem.cc +++ b/src/mem/simple_mem.cc @@ -154,7 +154,7 @@ SimpleMemory::recvTimingReq(PacketPtr pkt) assert(pkt->isResponse()); port.schedTimingResp(pkt, curTick() + latency); } else { - delete pkt; + pendingDelete.push_back(pkt); } return true; |