m-mpris: ‘Item’s are allocated with GLib

As are the string copies they point to, don't leak them and free them
the right way.
This commit is contained in:
Zander Brown 2025-11-05 14:12:36 +00:00 committed by George Kiagiadakis
parent 1846d75717
commit 3a6f2c1e90

View file

@ -98,8 +98,10 @@ static void item_free (gpointer data)
{
Item *item = data;
free(item->desktop_entry);
free(item);
g_clear_pointer (&item->desktop_entry, g_free);
g_clear_pointer (&item->flatpak_app_id, g_free);
g_clear_pointer (&item->flatpak_instance_id, g_free);
g_free (item);
}
static Players *players_new (GDBusConnection *conn)