summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/tankitem.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-12-18 08:47:53 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-18 08:34:00 -0800
commitf14ef84c9a944e407396d6985dc3b8623f3a613b (patch)
tree5374a898838fa1b1b0215e673f4fb219d4b58808 /qt-ui/profile/tankitem.cpp
parent4599172a19f95664ed44b8293aeca2cf30e3f171 (diff)
downloadsubsurface-f14ef84c9a944e407396d6985dc3b8623f3a613b.tar.gz
Free descriptions copied for TankItem
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/tankitem.cpp')
-rw-r--r--qt-ui/profile/tankitem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/profile/tankitem.cpp b/qt-ui/profile/tankitem.cpp
index 42692aacd..619368051 100644
--- a/qt-ui/profile/tankitem.cpp
+++ b/qt-ui/profile/tankitem.cpp
@@ -33,6 +33,13 @@ TankItem::TankItem(QObject *parent) :
memset(&diveCylinderStore, 0, sizeof(diveCylinderStore));
}
+TankItem::~TankItem()
+{
+ // Should this be clear_dive(diveCylinderStore)?
+ for (int i = 0; i < MAX_CYLINDERS; i++)
+ free((void *)diveCylinderStore.cylinder[i].type.description);
+}
+
void TankItem::setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d)
{
free(pInfoEntry);