arm: Fix memleak in VGic by adding destructor
Change-Id: I864b5d9ed655cc52e440e2eb54987e8ff9a73296 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3900 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:
@@ -60,6 +60,12 @@ VGic::VGic(const Params *p)
|
||||
assert(sys->numRunningContexts() <= VGIC_CPU_MAX);
|
||||
}
|
||||
|
||||
VGic::~VGic()
|
||||
{
|
||||
for (int x = 0; x < VGIC_CPU_MAX; x++)
|
||||
delete postVIntEvent[x];
|
||||
}
|
||||
|
||||
Tick
|
||||
VGic::read(PacketPtr pkt)
|
||||
{
|
||||
|
||||
@@ -206,6 +206,7 @@ class VGic : public PioDevice
|
||||
return dynamic_cast<const Params *>(_params);
|
||||
}
|
||||
VGic(const Params *p);
|
||||
~VGic();
|
||||
|
||||
AddrRangeList getAddrRanges() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user