summaryrefslogtreecommitdiffstats
path: root/patches/polkit-0.105/0020-0.113-authority-Fix-memory-leak-in-EnumerateActions-.patch
blob: 6b5668119ff8212a748e311331133e1bfcff40da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: "Max A. Dednev" <dednev@rambler.ru>
Date: Sun, 11 Jan 2015 20:00:44 -0500
Subject: [PATCH] 0.113: authority: Fix memory leak in EnumerateActions call
 results handler

Policykit-1 doesn't release reference counters of GVariant data for
org.freedesktop.PolicyKit1.Authority.EnumerateActions dbus call.  This
patch fixed reference counting and following memory leak.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88288
Origin: upstream, 0.113, commit:f4d71e0de885010494b8b0b8d62ca910011d7544

Imported from policykit-1_0.105-25.debian.tar.xz

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 src/polkit/polkitauthority.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/polkit/polkitauthority.c b/src/polkit/polkitauthority.c
index 9947cf3273b2..84dab72c6f0f 100644
--- a/src/polkit/polkitauthority.c
+++ b/src/polkit/polkitauthority.c
@@ -715,7 +715,6 @@ polkit_authority_enumerate_actions_finish (PolkitAuthority *authority,
   while ((child = g_variant_iter_next_value (&iter)) != NULL)
     {
       ret = g_list_prepend (ret, polkit_action_description_new_for_gvariant (child));
-      g_variant_ref_sink (child);
       g_variant_unref (child);
     }
   ret = g_list_reverse (ret);