jsauthority memleak fix (authored by klember)

This commit is contained in:
Jan Rybar 2019-10-28 13:20:50 +01:00
parent 4156e66e89
commit 05ad8ea7c5
2 changed files with 24 additions and 1 deletions

19
jsauthority-memleak.patch Normal file
View File

@ -0,0 +1,19 @@
commit 28e3a6653d8c3777b07e0128a0d97d46e586e311
Author: Jan Rybar <jrybar@redhat.com>
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 (); */

View File

@ -6,7 +6,7 @@
Summary: An authorization framework
Name: polkit
Version: 0.116
Release: 5%{?dist}
Release: 6%{?dist}
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
* Fri Oct 25 2019 Jan Rybar <jrybar@redhat.com> - 0.116-6
- jsauthority memleak fix
* Fri Sep 27 2019 Jan Rybar <jrybar@redhat.com> - 0.116-5
- pkttyagent: unread input flushed on terminal restore