From 0b0e56edebc849818b7a76b1c4e809f357394e04 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 20 Feb 2016 07:39:25 -0800 Subject: [PATCH] After freeing the samples, clear the pointer Otherwise we might end up trying to free them a second time. Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 009b21fe8..1f62cc5ea 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -481,6 +481,7 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location if (same_string(d->dc.model, "manually added dive")) { d->dc.maxdepth.mm = d->maxdepth.mm; free(d->dc.sample); + d->dc.sample = 0; d->dc.samples = 0; } }