From f5726c3d184dce88822fd84dbe994d6fa92c089b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 21 Jun 2015 20:24:07 -0700 Subject: 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 --- qt-models/diveplannermodel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-models/diveplannermodel.cpp') 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)); -- cgit v1.2.3-70-g09d2