diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-07-09 12:35:30 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-07-09 12:35:30 -0400 |
commit | ff5718f042ecccee694ae79c9386a589fd77e8ef (patch) | |
tree | 2caecba4b46e01b1dc964b62eac700219b6aa382 /src/dev/arm | |
parent | 92eaac07118a620c2c9dd48921eefcb7ca4422a8 (diff) | |
download | gem5-ff5718f042ecccee694ae79c9386a589fd77e8ef.tar.xz |
Fix: Address a few benign memory leaks
This patch is the result of static analysis identifying a number of
memory leaks. The leaks are all benign as they are a result of not
deallocating memory in the desctructor. The fix still has value as it
removes false positives in the static analysis.
Diffstat (limited to 'src/dev/arm')
-rw-r--r-- | src/dev/arm/pl111.cc | 5 | ||||
-rw-r--r-- | src/dev/arm/pl111.hh | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/dev/arm/pl111.cc b/src/dev/arm/pl111.cc index 7c25958e0..c1edc29ea 100644 --- a/src/dev/arm/pl111.cc +++ b/src/dev/arm/pl111.cc @@ -84,6 +84,11 @@ Pl111::Pl111(const Params *p) vncserver->setFramebufferAddr(dmaBuffer); } +Pl111::~Pl111() +{ + delete[] dmaBuffer; +} + // read registers and frame buffer Tick Pl111::read(PacketPtr pkt) diff --git a/src/dev/arm/pl111.hh b/src/dev/arm/pl111.hh index e0a03641c..36dfc46c1 100644 --- a/src/dev/arm/pl111.hh +++ b/src/dev/arm/pl111.hh @@ -316,6 +316,7 @@ class Pl111: public AmbaDmaDevice return dynamic_cast<const Params *>(_params); } Pl111(const Params *p); + ~Pl111(); virtual Tick read(PacketPtr pkt); virtual Tick write(PacketPtr pkt); |