PolicyKit: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 2 12:58:19 UTC 2023


 src/polkit/polkitsystembusname.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4eb887de6bb9382efeb93f9876d99480a0a5bf5e
Author: Luca Boccassi <bluca at debian.org>
Date:   Mon Oct 30 02:30:57 2023 +0000

    polkit_system_bus_name_get_creds_sync: unref fdlist
    
    The fd_list object is owned by the caller and has to be freed.
    
    Follow-up for a23d9ce375dcbc64aade92f3e082182b993c1169

diff --git a/src/polkit/polkitsystembusname.c b/src/polkit/polkitsystembusname.c
index d198783..f4b3372 100644
--- a/src/polkit/polkitsystembusname.c
+++ b/src/polkit/polkitsystembusname.c
@@ -493,7 +493,7 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName           *system_bus
   GMainContext *tmp_context = NULL;
   GVariantIter *iter;
   GVariant *result, *value;
-  GUnixFDList *fd_list;
+  GUnixFDList *fd_list = NULL;
   GError *dbus_error = NULL;
   const gchar *key;
   guint32 uid = G_MAXUINT32, pid = 0;
@@ -598,6 +598,8 @@ polkit_system_bus_name_get_creds_sync (PolkitSystemBusName           *system_bus
     g_error_free (dbus_error);
   if (gids)
     g_array_unref (gids);
+  if (fd_list != NULL)
+    g_object_unref (fd_list);
 
   return ret;
 }


More information about the hal-commit mailing list