Fix a memory leak in PolkitPermission

This commit is contained in:
Miloslav Trmač 2017-04-04 23:00:07 +02:00
parent 21dddc3a15
commit fb5b854986
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From dfd2c165447029c32510842350e924ef5ac3f679 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Thu, 2 Mar 2017 14:50:31 +0100
Subject: [PATCH] polkitpermission: Fix a memory leak on authority changes
Signed-off-by: Rui Matos <tiagomatos@gmail.com>
https://bugs.freedesktop.org/show_bug.cgi?id=99741
---
src/polkit/polkitpermission.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/polkit/polkitpermission.c b/src/polkit/polkitpermission.c
index f8a666e..f264094 100644
--- a/src/polkit/polkitpermission.c
+++ b/src/polkit/polkitpermission.c
@@ -454,6 +454,7 @@ changed_check_cb (GObject *source_object,
if (result != NULL)
{
process_result (permission, result);
+ g_object_unref (result);
}
else
{
--
2.9.3

View File

@ -6,13 +6,15 @@
Summary: An authorization framework
Name: polkit
Version: 0.113
Release: 11%{?dist}
Release: 12%{?dist}
License: LGPLv2+
URL: http://www.freedesktop.org/wiki/Software/polkit
Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz
Source1: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz.sign
# https://bugs.freedesktop.org/show_bug.cgi?id=99741
Patch0: polkit-0.113-agent-leaks.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=99741
Patch1: polkit-0.113-polkitpermission-leak.patch
Group: System Environment/Libraries
BuildRequires: glib2-devel >= 2.30.0
BuildRequires: expat-devel
@ -92,6 +94,7 @@ Libraries files for polkit.
%prep
%setup -q
%patch0 -p1 -b .agent-leaks
%patch1 -p1 -b .polkitpermission-leak
%build
%if 0%{?enable_autoreconf}
@ -177,6 +180,11 @@ exit 0
%{_libdir}/girepository-1.0/*.typelib
%changelog
* Tue Apr 4 2017 Miloslav Trmač <mitr@redhat.com> - 0.113-12
- Fix a memory leak in PolkitPermission.
Patch by Rui Matos <tiagomatos@gmail.com>
Resolves: #1433915
* Tue Apr 4 2017 Miloslav Trmač <mitr@redhat.com> - 0.113-11
- Revert back to the state in 0.113-7, undoing the untested changes.