diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-21 20:24:07 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-21 21:13:32 -0700 |
commit | f5726c3d184dce88822fd84dbe994d6fa92c089b (patch) | |
tree | ea5f96a9a81a4f07b3425bad134ed9a4959aa10f /qt-models/diveplannermodel.cpp | |
parent | 004705e33e450c52d6753c55797885aedb6ad769 (diff) | |
download | subsurface-f5726c3d184dce88822fd84dbe994d6fa92c089b.tar.gz |
Fix a number of resource leaks
Free memory returned from parse_mkvi_value()
Free memory returned from printGPSCoords()
Free memory allocated in added_list and removed_list
Free memory allocated when adding suffix to dive site name
Free memory allocated in cache_deco_state()
Free memory allocated in build_filename()
Free memory allocated in get_utf8()
Free memory allocated in alloc_dive()
Free memory allocated as cache but never used
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 655f1bd8b..a4ca14715 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -882,6 +882,7 @@ void DivePlannerPointsModel::createPlan(bool replanCopy) //TODO: C-based function here? bool did_deco = plan(&diveplan, &cache, isPlanner(), true); + free(cache); if (!current_dive || displayed_dive.id != current_dive->id) { // we were planning a new dive, not re-planning an existing on record_dive(clone_dive(&displayed_dive)); |