summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-10-30 02:30:57 +0000
committerLuca Boccassi <bluca@debian.org>2023-10-30 03:06:06 +0000
commit4eb887de6bb9382efeb93f9876d99480a0a5bf5e (patch)
tree1dea006ab9b982358415881d8caf97ed78fdd947
parent88ad34985ec9d964efce735dd9541d20b61b74d4 (diff)
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
-rw-r--r--src/polkit/polkitsystembusname.c4
1 files changed, 3 insertions, 1 deletions
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;
}