From e20c3c907da0972d2f1da26eabdafa8076156265 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sat, 21 Mar 2015 22:21:34 -0700 Subject: [PATCH] Fixed config memory leak. --- core/kdeconnectplugin.cpp | 3 +++ kcmplugin/kdeconnectpluginkcm.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/kdeconnectplugin.cpp b/core/kdeconnectplugin.cpp index 3f499c97c..ac83e65d9 100644 --- a/core/kdeconnectplugin.cpp +++ b/core/kdeconnectplugin.cpp @@ -51,6 +51,9 @@ KdeConnectPluginConfig* KdeConnectPlugin::config() const KdeConnectPlugin::~KdeConnectPlugin() { + if (d->mConfig) { + delete d->mConfig; + } } const Device* KdeConnectPlugin::device() diff --git a/kcmplugin/kdeconnectpluginkcm.cpp b/kcmplugin/kdeconnectpluginkcm.cpp index aa42e4e02..15c936726 100644 --- a/kcmplugin/kdeconnectpluginkcm.cpp +++ b/kcmplugin/kdeconnectpluginkcm.cpp @@ -44,7 +44,7 @@ KdeConnectPluginKcm::KdeConnectPluginKcm(QWidget* parent, const QVariantList& ar KdeConnectPluginKcm::~KdeConnectPluginKcm() { - + delete d->mConfig; } KdeConnectPluginConfig* KdeConnectPluginKcm::config() const