summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-26 13:14:40 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-12-26 13:41:58 -0800
commit652e382e686df5fe0e63e2f2568e820819ab1b08 (patch)
tree9f93a78ba35fbd7fcb88dd5b0ffb5cf8f040d46e /qt-models/diveplannermodel.cpp
parent65213f044e463fb6cadfe2a08f81a07efd364155 (diff)
downloadsubsurface-652e382e686df5fe0e63e2f2568e820819ab1b08.tar.gz
Cleanup: avoid a few memory leaks
Coverity CID 215199 Coverity CID 215195 Coverity CID 215196 Coverity CID 215198 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 1d3e3347e..8efb3473c 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -1019,7 +1019,7 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, s
if (in_planner() && prefs.display_variations && decoMode() != RECREATIONAL) {
int my_instance = ++instanceCounter;
cache_deco_state(&ds, &save);
-
+
duration_t delta_time = { .seconds = 60 };
QString time_units = tr("min");
depth_t delta_depth;
@@ -1089,6 +1089,9 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, s
finish:
free_dps(original_plan);
free(original_plan);
+ free(save);
+ free(cache);
+ free(dive);
// setRecalc(oldRecalc);
}