summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-07-21 18:14:04 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-07-21 18:35:40 +0200
commit744ce06a14601c888a2e9f4cd2a3049c69a98153 (patch)
treefa97373c1f9435301bbd14942ae62d9749132a0e /kde-frameworks
parentnet-p2p/ktorrent: Fix build with USE=rss and Qt 5.11 (diff)
downloadgentoo-744ce06a14601c888a2e9f4cd2a3049c69a98153.tar.gz
gentoo-744ce06a14601c888a2e9f4cd2a3049c69a98153.tar.bz2
gentoo-744ce06a14601c888a2e9f4cd2a3049c69a98153.zip
kde-frameworks/kio: Fix memleak in slave jobs
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=396651 Package-Manager: Portage-2.3.43, Repoman-2.3.10
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/kio/files/kio-5.48.0-memleak.patch65
-rw-r--r--kde-frameworks/kio/kio-5.48.0-r1.ebuild81
2 files changed, 146 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.48.0-memleak.patch b/kde-frameworks/kio/files/kio-5.48.0-memleak.patch
new file mode 100644
index 000000000000..2245c976b8ab
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.48.0-memleak.patch
@@ -0,0 +1,65 @@
+From 021daba60fafdf304b1079a705de900c431bb579 Mon Sep 17 00:00:00 2001
+From: Jaime Torres <jtamate@gmail.com>
+Date: Sat, 21 Jul 2018 13:43:35 +0200
+Subject: avoid memory leak in slave jobs
+
+Summary:
+Making ~SlaveInterface virtual, the connection created in Slave constructor is now deleted. (thanks @dfaure).
+Changed to new connect syntax.
+
+BUG: 396651
+
+Test Plan:
+The leaks of the bug report are gone.
+
+Reviewers: dfaure, #frameworks, ngraham
+
+Reviewed By: dfaure
+
+Subscribers: anthonyfieroni, apol, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D14253
+---
+ src/core/slave.cpp | 4 ++--
+ src/core/slaveinterface_p.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/core/slave.cpp b/src/core/slave.cpp
+index 9402b44..7823d73 100644
+--- a/src/core/slave.cpp
++++ b/src/core/slave.cpp
+@@ -171,7 +171,7 @@ void Slave::accept()
+ d->slaveconnserver->deleteLater();
+ d->slaveconnserver = nullptr;
+
+- connect(d->connection, SIGNAL(readyRead()), SLOT(gotInput()));
++ connect(d->connection, &Connection::readyRead, this, &Slave::gotInput);
+ }
+
+ void Slave::timeout()
+@@ -218,7 +218,7 @@ Slave::Slave(const QString &protocol, QObject *parent)
+ Q_D(Slave);
+ d->slaveconnserver->setParent(this);
+ d->connection = new Connection(this);
+- connect(d->slaveconnserver, SIGNAL(newConnection()), SLOT(accept()));
++ connect(d->slaveconnserver, &ConnectionServer::newConnection, this, &Slave::accept);
+ }
+
+ Slave::~Slave()
+diff --git a/src/core/slaveinterface_p.h b/src/core/slaveinterface_p.h
+index 4ed1f36..a4cb5d3 100644
+--- a/src/core/slaveinterface_p.h
++++ b/src/core/slaveinterface_p.h
+@@ -42,7 +42,7 @@ public:
+ nums(0), slave_calcs_speed(false)
+ {
+ }
+- ~SlaveInterfacePrivate()
++ virtual ~SlaveInterfacePrivate()
+ {
+ delete connection;
+ }
+--
+cgit v0.11.2
diff --git a/kde-frameworks/kio/kio-5.48.0-r1.ebuild b/kde-frameworks/kio/kio-5.48.0-r1.ebuild
new file mode 100644
index 000000000000..43bb9151a5ae
--- /dev/null
+++ b/kde-frameworks/kio/kio-5.48.0-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_TEST="forceoptional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Framework providing transparent file and data management"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="acl +handbook kerberos +kwallet X"
+
+RDEPEND="
+ $(add_frameworks_dep kauth)
+ $(add_frameworks_dep karchive)
+ $(add_frameworks_dep kbookmarks)
+ $(add_frameworks_dep kcodecs)
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep kjobwidgets)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep ktextwidgets)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_frameworks_dep solid)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork 'ssl')
+ $(add_qt_dep qtscript)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ dev-libs/libxml2
+ dev-libs/libxslt
+ acl? (
+ sys-apps/attr
+ virtual/acl
+ )
+ handbook? ( $(add_frameworks_dep kdoctools) )
+ kerberos? ( virtual/krb5 )
+ kwallet? ( $(add_frameworks_dep kwallet) )
+ X? ( $(add_qt_dep qtx11extras) )
+"
+DEPEND="${RDEPEND}
+ $(add_qt_dep qtconcurrent)
+ test? ( sys-libs/zlib )
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXrender
+ )
+"
+PDEPEND="
+ $(add_frameworks_dep kded)
+"
+
+PATCHES=( "${FILESDIR}/${P}-memleak.patch" )
+
+# tests hang
+RESTRICT+=" test"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package acl ACL)
+ $(cmake-utils_use_find_package handbook KF5DocTools)
+ $(cmake-utils_use_find_package kerberos GSSAPI)
+ $(cmake-utils_use_find_package kwallet KF5Wallet)
+ $(cmake-utils_use_find_package X X11)
+ )
+
+ kde5_src_configure
+}