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/sim | |
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/sim')
-rw-r--r-- | src/sim/serialize.cc | 4 | ||||
-rw-r--r-- | src/sim/serialize.hh | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc index 30655e692..54b7926d6 100644 --- a/src/sim/serialize.cc +++ b/src/sim/serialize.cc @@ -613,6 +613,10 @@ Checkpoint::Checkpoint(const string &cpt_dir) } } +Checkpoint::~Checkpoint() +{ + delete db; +} bool Checkpoint::find(const string §ion, const string &entry, string &value) diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index 46e546be4..fdb0f4033 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -254,6 +254,7 @@ class Checkpoint public: Checkpoint(const std::string &cpt_dir); + ~Checkpoint(); const std::string cptDir; |