Blame SOURCES/polkit-0.112-agent-leaks.patch

51ea8e
A part of commit 7ecf29a9db86f7161e2ff48e7bb8ea46a90f954f
51ea8e
Author: Miloslav Trmač <mitr@redhat.com>
51ea8e
Date:   Wed Feb 8 22:57:21 2017 +0100
51ea8e
51ea8e
    Fix a memory leak in server_handle_authentication_agent_response{,2}
51ea8e
    
51ea8e
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
51ea8e
51ea8e
diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c
51ea8e
index 2bcad62..cad3f74 100644
51ea8e
--- a/src/polkitbackend/polkitbackendauthority.c
51ea8e
+++ b/src/polkitbackend/polkitbackendauthority.c
51ea8e
@@ -1054,6 +1054,7 @@ server_handle_authentication_agent_response (Server                 *server,
51ea8e
   g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
51ea8e
 
51ea8e
  out:
51ea8e
+  g_variant_unref (identity_gvariant);
51ea8e
   if (identity != NULL)
51ea8e
     g_object_unref (identity);
51ea8e
 }
51ea8e
commit d9efd2673d73214e7990e3e67cdddfa77c6a8226
51ea8e
Author: Miloslav Trmač <mitr@redhat.com>
51ea8e
Date:   Wed Feb 8 22:55:10 2017 +0100
51ea8e
51ea8e
    Fix a memory leak in server_handle_unregister_authentication_agent
51ea8e
    
51ea8e
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
51ea8e
51ea8e
diff --git a/src/polkitbackend/polkitbackendauthority.c b/src/polkitbackend/polkitbackendauthority.c
51ea8e
index 7e08e57..2bcad62 100644
51ea8e
--- a/src/polkitbackend/polkitbackendauthority.c
51ea8e
+++ b/src/polkitbackend/polkitbackendauthority.c
51ea8e
@@ -1003,6 +1003,7 @@ server_handle_unregister_authentication_agent (Server                 *server,
51ea8e
   g_dbus_method_invocation_return_value (invocation, g_variant_new ("()"));
51ea8e
 
51ea8e
  out:
51ea8e
+  g_variant_unref (subject_gvariant);
51ea8e
   if (subject != NULL)
51ea8e
     g_object_unref (subject);
51ea8e
 }
51ea8e
commit af4566e1a7e9031b9a05f49c7d27bf379d822016
51ea8e
Author: Miloslav Trmač <mitr@redhat.com>
51ea8e
Date:   Thu Feb 9 19:53:54 2017 +0100
51ea8e
51ea8e
    Fix a memory leak per agent authentication
51ea8e
    
51ea8e
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
51ea8e
51ea8e
diff --git a/src/polkitbackend/polkitbackendinteractiveauthority.c b/src/polkitbackend/polkitbackendinteractiveauthority.c
51ea8e
index bf0ee48..b8096b3 100644
51ea8e
--- a/src/polkitbackend/polkitbackendinteractiveauthority.c
51ea8e
+++ b/src/polkitbackend/polkitbackendinteractiveauthority.c
51ea8e
@@ -1906,15 +1906,15 @@ authentication_agent_begin_cb (GDBusProxy   *proxy,
51ea8e
   AuthenticationSession *session = user_data;
51ea8e
   gboolean gained_authorization;
51ea8e
   gboolean was_dismissed;
51ea8e
+  GVariant *result;
51ea8e
   GError *error;
51ea8e
 
51ea8e
   was_dismissed = FALSE;
51ea8e
   gained_authorization = FALSE;
51ea8e
 
51ea8e
   error = NULL;
51ea8e
-  if (!g_dbus_proxy_call_finish (proxy,
51ea8e
-                                 res,
51ea8e
-                                 &error))
51ea8e
+  result = g_dbus_proxy_call_finish (proxy, res, &error);
51ea8e
+  if (result == NULL)
51ea8e
     {
51ea8e
       g_printerr ("Error performing authentication: %s (%s %d)\n",
51ea8e
                   error->message,
51ea8e
@@ -1926,6 +1926,7 @@ authentication_agent_begin_cb (GDBusProxy   *proxy,
51ea8e
     }
51ea8e
   else
51ea8e
     {
51ea8e
+      g_variant_unref (result);
51ea8e
       gained_authorization = session->is_authenticated;
51ea8e
       g_debug ("Authentication complete, is_authenticated = %d", session->is_authenticated);
51ea8e
     }