From 4eb887de6bb9382efeb93f9876d99480a0a5bf5e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 30 Oct 2023 02:30:57 +0000 Subject: 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 --- src/polkit/polkitsystembusname.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3