From c86c5d69051f84634082589326ae7ab8a76c3b6f Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 6 Nov 2017 20:34:21 +0100 Subject: [PATCH] clutter: Plug evdev ClutterDeviceManager leaks The unused ID GList element is leaked, and so is the node path. https://bugzilla.gnome.org/show_bug.cgi?id=789984 --- clutter/clutter/evdev/clutter-device-manager-evdev.c | 2 +- clutter/clutter/evdev/clutter-input-device-evdev.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/evdev/clutter-device-manager-evdev.c b/clutter/clutter/evdev/clutter-device-manager-evdev.c index 9de2ea155..f40746a2f 100644 --- a/clutter/clutter/evdev/clutter-device-manager-evdev.c +++ b/clutter/clutter/evdev/clutter-device-manager-evdev.c @@ -2185,7 +2185,7 @@ _clutter_device_manager_evdev_acquire_device_id (ClutterDeviceManagerEvdev *mana first = g_list_first (priv->free_device_ids); next_id = GPOINTER_TO_INT (first->data); - priv->free_device_ids = g_list_remove_link (priv->free_device_ids, first); + priv->free_device_ids = g_list_delete_link (priv->free_device_ids, first); return next_id; } diff --git a/clutter/clutter/evdev/clutter-input-device-evdev.c b/clutter/clutter/evdev/clutter-input-device-evdev.c index cb4340a8f..5328c56d3 100644 --- a/clutter/clutter/evdev/clutter-input-device-evdev.c +++ b/clutter/clutter/evdev/clutter-input-device-evdev.c @@ -307,6 +307,7 @@ _clutter_input_device_evdev_new (ClutterDeviceManager *manager, libinput_device_ref (libinput_device); g_free (vendor); g_free (product); + g_free (node_path); if (libinput_device_get_size (libinput_device, &width, &height) == 0) device->device_aspect_ratio = width / height;