diff -Nru lxqt-policykit-0.14.1/debian/changelog lxqt-policykit-0.14.1/debian/changelog --- lxqt-policykit-0.14.1/debian/changelog 2020-02-15 19:27:22.000000000 +0100 +++ lxqt-policykit-0.14.1/debian/changelog 2021-11-05 17:10:01.000000000 +0100 @@ -1,3 +1,11 @@ +lxqt-policykit (0.14.1-1ubuntu3) focal; urgency=medium + + * Fix crashes with more than one sudoer (LP: #1875774) + - Add patch better-memory-handling.diff + - Refresh and update patch for 0.14.1 + + -- apt-ghetto Fri, 05 Nov 2021 17:10:01 +0100 + lxqt-policykit (0.14.1-1ubuntu2) focal; urgency=medium * Modified rules to be consistent with debian unstable. diff -Nru lxqt-policykit-0.14.1/debian/patches/better-memory-handling.diff lxqt-policykit-0.14.1/debian/patches/better-memory-handling.diff --- lxqt-policykit-0.14.1/debian/patches/better-memory-handling.diff 1970-01-01 01:00:00.000000000 +0100 +++ lxqt-policykit-0.14.1/debian/patches/better-memory-handling.diff 2021-09-07 17:47:09.000000000 +0200 @@ -0,0 +1,69 @@ +Author: Palo Kisa +Author: Lubuntu Developers +Origin: https://github.com/lxqt/lxqt-policykit/commit/fc57746b8ccb62536ef158a1b01b47ef327c7fbd.patch +Description: PolicykitAgent: Add better memory handling + Don't delete the session in the slot as we can't be sure if any other + activity is done on the sender object after our slot finishes. +Bug: https://github.com/lxqt/lxqt-policykit/issues/105 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxqt-policykit/+bug/1875774 +Last-Update: 2021-09-07 +--- + src/policykitagent.cpp | 13 ++++++++++--- + src/policykitagent.h | 3 +++ + 2 files changed, 13 insertions(+), 3 deletions(-) + +--- a/src/policykitagent.cpp ++++ b/src/policykitagent.cpp +@@ -55,6 +55,14 @@ PolicykitAgent::~PolicykitAgent() + m_gui->blockSignals(true); + m_gui->deleteLater(); + } ++ deleteSessions(); ++} ++ ++void PolicykitAgent::deleteSessions() ++{ ++ for (auto i = m_SessionIdentity.begin(), i_e = m_SessionIdentity.end(); i != i_e; ++i) ++ delete i.key(); ++ m_SessionIdentity.clear(); + } + + +@@ -72,7 +80,7 @@ void PolicykitAgent::initiateAuthenticat + return; + } + m_inProgress = true; +- m_SessionIdentity.clear(); ++ deleteSessions(); + + if (m_gui) + { +@@ -134,7 +142,7 @@ void PolicykitAgent::completed(bool gain + Q_ASSERT(session); + Q_ASSERT(m_gui); + +- if (m_gui->identity() == m_SessionIdentity[session].toString()) ++ if (m_inProgress && m_gui->identity() == m_SessionIdentity[session].toString()) + { + if (!gainedAuthorization) + { +@@ -147,7 +155,6 @@ void PolicykitAgent::completed(bool gain + m_inProgress = false; + } + +- delete session; + } + + void PolicykitAgent::showError(const QString &text) +--- a/src/policykitagent.h ++++ b/src/policykitagent.h +@@ -67,6 +67,9 @@ public slots: + void showError(const QString &text); + void showInfo(const QString &text); + ++protected: ++ void deleteSessions(); ++ + private: + bool m_inProgress; + PolicykitAgentGUI * m_gui; diff -Nru lxqt-policykit-0.14.1/debian/patches/series lxqt-policykit-0.14.1/debian/patches/series --- lxqt-policykit-0.14.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ lxqt-policykit-0.14.1/debian/patches/series 2021-09-07 17:18:30.000000000 +0200 @@ -0,0 +1 @@ +better-memory-handling.diff