summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/downloadfromdivecomputer.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-18 15:58:07 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-18 09:06:32 -0700
commita70597b9033562d4aed58244f3300c7121271ca2 (patch)
tree54f65ecf8013267865311d393d938e1cf0d1b6bf /desktop-widgets/downloadfromdivecomputer.h
parent69248141c53bdee3ccac5231a3236dee5b920d56 (diff)
downloadsubsurface-a70597b9033562d4aed58244f3300c7121271ca2.tar.gz
Leak fix: make ostcFirmwareCheck a unique_ptr
ostcFirmwareCheck in DownloadFromDCWidget was neither freed in the destructor, not freed if a new object was allocated. Simply make it a unique_ptr<> to do all the work for us. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/downloadfromdivecomputer.h')
-rw-r--r--desktop-widgets/downloadfromdivecomputer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.h b/desktop-widgets/downloadfromdivecomputer.h
index 4d1a912e9..c70ee651a 100644
--- a/desktop-widgets/downloadfromdivecomputer.h
+++ b/desktop-widgets/downloadfromdivecomputer.h
@@ -7,6 +7,7 @@
#include <QHash>
#include <QMap>
#include <QAbstractTableModel>
+#include <memory>
#include "core/libdivecomputer.h"
#include "desktop-widgets/configuredivecomputerdialog.h"
@@ -79,7 +80,7 @@ private:
void fill_device_list(unsigned int transport);
QTimer *timer;
bool dumpWarningShown;
- OstcFirmwareCheck *ostcFirmwareCheck;
+ std::unique_ptr<OstcFirmwareCheck> ostcFirmwareCheck;
DiveImportedModel *diveImportedModel;
#if defined(BT_SUPPORT)
BtDeviceSelectionDialog *btDeviceSelectionDialog;