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>
This commit is contained in:
Sean Wilson
2017-06-29 09:12:26 -05:00
parent 9e8aa9b973
commit 637e1ec740
2 changed files with 7 additions and 0 deletions

View File

@@ -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)
{

View File

@@ -365,6 +365,7 @@ class Pl390 : public BaseGic, public BaseGicRegisters
return dynamic_cast<const Params *>(_params);
}
Pl390(const Params *p);
~Pl390();
DrainState drain() override;