From d9ebdb7610e147395b1cb08d128a7c4d93ffb4bb Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sun, 16 Jan 2011 22:47:12 +0900 Subject: [PATCH] Plugged memory leak in gdk_x11_device_manager_xi2_list_devices. This was simply a misplaced 'g_list_copy()'. --- gdk/x11/gdkdevicemanager-xi2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 465099f577..c7e8f85565 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -496,7 +496,7 @@ gdk_x11_device_manager_xi2_list_devices (GdkDeviceManager *device_manager, switch (type) { case GDK_DEVICE_TYPE_MASTER: - list = device_manager_xi2->master_devices; + list = g_list_copy (device_manager_xi2->master_devices); break; case GDK_DEVICE_TYPE_SLAVE: case GDK_DEVICE_TYPE_FLOATING: @@ -519,7 +519,7 @@ gdk_x11_device_manager_xi2_list_devices (GdkDeviceManager *device_manager, g_assert_not_reached (); } - return g_list_copy (list); + return list; } static GdkDevice *