summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga+gem5@gmail.com>2013-01-08 08:54:06 -0500
committerMitch Hayenga <mitch.hayenga+gem5@gmail.com>2013-01-08 08:54:06 -0500
commitdc4a0aa2fa1bc3767785b552159ab0ebe5baa72e (patch)
tree653944fd5d2938c2a0684a209a6a18534504d0d6 /src
parent8480615d8d148ad81ac6242a96edf77293c93078 (diff)
downloadgem5-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.cc2
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;