summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Brüns <[email protected]>2018-09-06 05:12:30 +0200
committerStefan Brüns <[email protected]>2018-11-15 00:57:15 +0100
commit9e90fdd2a593dbb3e8cc1b99bb1ff6c9a118ca8e (patch)
treeb4bc299f2fc9de273f0377e59ead8cc09f9823d9
parent145caeac105043d2d0bfba40717e9ed336471ccf (diff)
[Bookmarks Runner] Avoid leaking FetchSqlite instances
Summary: The favicon and places instances are created in the prepare() call, leaking the instance from the last invocation. Delete the old instance in teardown(). See also T9626. Test Plan: run several queries in krunner -> instances are no longer leaked Reviewers: #frameworks, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D16410
-rw-r--r--runners/bookmarks/browsers/firefox.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/runners/bookmarks/browsers/firefox.cpp b/runners/bookmarks/browsers/firefox.cpp
index b382578..a613005 100644
--- a/runners/bookmarks/browsers/firefox.cpp
+++ b/runners/bookmarks/browsers/firefox.cpp
@@ -149,9 +149,13 @@ void Firefox::teardown()
{
if(m_fetchsqlite) {
m_fetchsqlite->teardown();
+ delete m_fetchsqlite;
+ m_fetchsqlite = nullptr;
}
if(m_fetchsqlite_fav) {
m_fetchsqlite_fav->teardown();
+ delete m_fetchsqlite_fav;
+ m_fetchsqlite_fav = nullptr;
delete m_favicon;
m_favicon = nullptr;
}