From baea76da3226dc76c6361af419f39bec9ac7b3d4 Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Mon, 28 Oct 2019 14:12:11 +0100 Subject: [PATCH] jsauthority memleak fix --- jsauthority-memleak.patch | 19 +++++++++++++++++++ polkit.spec | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 jsauthority-memleak.patch diff --git a/jsauthority-memleak.patch b/jsauthority-memleak.patch new file mode 100644 index 0000000..f356cc1 --- /dev/null +++ b/jsauthority-memleak.patch @@ -0,0 +1,19 @@ +commit 28e3a6653d8c3777b07e0128a0d97d46e586e311 +Author: Jan Rybar +Date: Tue Oct 8 13:28:18 2019 +0000 + + jsauthority: Fix two minor memory leaks + +diff --git a/src/polkitbackend/polkitbackendjsauthority.cpp b/src/polkitbackend/polkitbackendjsauthority.cpp +index 9b752d1..e97b8aa 100644 +--- a/src/polkitbackend/polkitbackendjsauthority.cpp ++++ b/src/polkitbackend/polkitbackendjsauthority.cpp +@@ -567,6 +567,8 @@ polkit_backend_js_authority_finalize (GObject *object) + g_strfreev (authority->priv->rules_dirs); + + delete authority->priv->ac; ++ delete authority->priv->js_global; ++ delete authority->priv->js_polkit; + + JS_DestroyContext (authority->priv->cx); + /* JS_ShutDown (); */ diff --git a/polkit.spec b/polkit.spec index 885a1ce..904074a 100644 --- a/polkit.spec +++ b/polkit.spec @@ -6,7 +6,7 @@ Summary: An authorization framework Name: polkit Version: 0.116 -Release: 2%{?dist}.1 +Release: 2%{?dist}.2 License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/polkit Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz @@ -14,6 +14,7 @@ Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}. Patch1: polkit-0.116-pkttyagent-sigttou-bg-job.patch Patch2: pkttyagent-tcsaflush-batch-erase.patch +Patch3: jsauthority-memleak.patch BuildRequires: gcc-c++ BuildRequires: glib2-devel >= 2.30.0 @@ -177,6 +178,9 @@ exit 0 %{_libdir}/girepository-1.0/*.typelib %changelog +* Mon Oct 28 2019 Jan Rybar - 0.116-2.2 +- jsauthority memleak fix + * Wed Oct 02 2019 Jan Rybar - 0.116-2.1 - pkttyagent: backport patch, get SIGTTOU in background job - pkttyagent: unread input flushed on terminal restore