diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-29 09:12:26 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-06-29 19:10:13 +0000 |
commit | 637e1ec740b78bf063190c3068a9c50cf8207637 (patch) | |
tree | 3dd8f26f5a4a6c18c6808cf408ecebbe05eeb535 /src/dev/arm | |
parent | 9e8aa9b973e34885283f1d41b041321b7c4f7b32 (diff) | |
download | gem5-637e1ec740b78bf063190c3068a9c50cf8207637.tar.xz |
arm: Fix memleak in Pl390 by adding destructor
Change-Id: I3395e64311f6aa7bbfb6eee9bfec82e832bcbd4d
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3901
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/arm')
-rw-r--r-- | src/dev/arm/gic_pl390.cc | 6 | ||||
-rw-r--r-- | src/dev/arm/gic_pl390.hh | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/dev/arm/gic_pl390.cc b/src/dev/arm/gic_pl390.cc index ce27e94fc..7b63306c3 100644 --- a/src/dev/arm/gic_pl390.cc +++ b/src/dev/arm/gic_pl390.cc @@ -95,6 +95,12 @@ Pl390::Pl390(const Params *p) gem5ExtensionsEnabled = false; } +Pl390::~Pl390() +{ + for (int x = 0; x < CPU_MAX; x++) + delete postIntEvent[x]; +} + Tick Pl390::read(PacketPtr pkt) { diff --git a/src/dev/arm/gic_pl390.hh b/src/dev/arm/gic_pl390.hh index 05c9b5f70..5c8a71222 100644 --- a/src/dev/arm/gic_pl390.hh +++ b/src/dev/arm/gic_pl390.hh @@ -365,6 +365,7 @@ class Pl390 : public BaseGic, public BaseGicRegisters return dynamic_cast<const Params *>(_params); } Pl390(const Params *p); + ~Pl390(); DrainState drain() override; |