Accepting request 844891 from home:Vogtinator:plasma5.20
- Add patch to fix memory leak (kde#428048): * 0001-Autodelete-smapsRunnable.patch OBS-URL: https://build.opensuse.org/request/show/844891 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/libksysguard5?expand=0&rev=279
This commit is contained in:
parent
3288c200da
commit
9001270f73
46
0001-Autodelete-smapsRunnable.patch
Normal file
46
0001-Autodelete-smapsRunnable.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From ebcf87527c32db0b6685c63a450489d2c6727069 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Edmundson <kde@davidedmundson.co.uk>
|
||||||
|
Date: Thu, 29 Oct 2020 11:07:36 +0000
|
||||||
|
Subject: [PATCH] Autodelete smapsRunnable
|
||||||
|
|
||||||
|
The runnable has an early return on error conditions. This means
|
||||||
|
finished() might never be called.
|
||||||
|
|
||||||
|
Now we've removed the accessor and provide the return value in the
|
||||||
|
signal we can just set autoDelete.
|
||||||
|
|
||||||
|
BUG: 428048
|
||||||
|
---
|
||||||
|
processcore/processes_linux_p.cpp | 2 --
|
||||||
|
processcore/read_procsmaps_runnable.cpp | 2 +-
|
||||||
|
2 files changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/processcore/processes_linux_p.cpp b/processcore/processes_linux_p.cpp
|
||||||
|
index 6882f82..ee5559c 100644
|
||||||
|
--- a/processcore/processes_linux_p.cpp
|
||||||
|
+++ b/processcore/processes_linux_p.cpp
|
||||||
|
@@ -558,8 +558,6 @@ bool ProcessesLocal::updateProcessInfo( long pid, Process *process)
|
||||||
|
Q_EMIT processUpdated(pid, { { Process::VmPSS, pss } });
|
||||||
|
});
|
||||||
|
|
||||||
|
- connect(runnable, &ReadProcSmapsRunnable::finished, runnable, &QObject::deleteLater);
|
||||||
|
-
|
||||||
|
QThreadPool::globalInstance()->start(runnable);
|
||||||
|
|
||||||
|
if(!d->readProcStat(dir, process)) success = false;
|
||||||
|
diff --git a/processcore/read_procsmaps_runnable.cpp b/processcore/read_procsmaps_runnable.cpp
|
||||||
|
index ecace51..b91466b 100644
|
||||||
|
--- a/processcore/read_procsmaps_runnable.cpp
|
||||||
|
+++ b/processcore/read_procsmaps_runnable.cpp
|
||||||
|
@@ -14,7 +14,7 @@ ReadProcSmapsRunnable::ReadProcSmapsRunnable(const QString &dir)
|
||||||
|
: QObject()
|
||||||
|
, m_dir(dir)
|
||||||
|
{
|
||||||
|
- setAutoDelete(false);
|
||||||
|
+ setAutoDelete(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadProcSmapsRunnable::run()
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 29 15:03:03 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
|
||||||
|
- Add patch to fix memory leak (kde#428048):
|
||||||
|
* 0001-Autodelete-smapsRunnable.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 27 20:43:50 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
Tue Oct 27 20:43:50 UTC 2020 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ Source1: https://download.kde.org/stable/plasma/%{version}/libksysguard-%
|
|||||||
Source2: plasma.keyring
|
Source2: plasma.keyring
|
||||||
%endif
|
%endif
|
||||||
Source3: baselibs.conf
|
Source3: baselibs.conf
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch1: 0001-Autodelete-smapsRunnable.patch
|
||||||
BuildRequires: extra-cmake-modules >= 1.2.0
|
BuildRequires: extra-cmake-modules >= 1.2.0
|
||||||
BuildRequires: kf5-filesystem
|
BuildRequires: kf5-filesystem
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user