summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-models/cylindermodel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp
index 201676bde..554d81cc7 100644
--- a/qt-models/cylindermodel.cpp
+++ b/qt-models/cylindermodel.cpp
@@ -322,6 +322,7 @@ bool CylindersModel::setData(const QModelIndex &index, const QVariant &value, in
QByteArray ba = value.toByteArray();
const char *text = ba.constData();
if (!cyl->type.description || strcmp(cyl->type.description, text)) {
+ free((void *)cyl->type.description);
cyl->type.description = strdup(text);
changed = true;
}