[mutter] clutter: Plug evdev ClutterDeviceManager leaks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Plug evdev ClutterDeviceManager leaks
- Date: Tue, 7 Nov 2017 10:13:25 +0000 (UTC)
commit c86c5d69051f84634082589326ae7ab8a76c3b6f
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Nov 6 20:34:21 2017 +0100
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/evdev/clutter-device-manager-evdev.c | 2 +-
clutter/clutter/evdev/clutter-input-device-evdev.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter/evdev/clutter-device-manager-evdev.c
b/clutter/clutter/evdev/clutter-device-manager-evdev.c
index 9de2ea1..f40746a 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 cb4340a..5328c56 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]