[gtk+] Plugged memory leak in gdk_x11_device_manager_xi2_list_devices.



commit d9ebdb7610e147395b1cb08d128a7c4d93ffb4bb
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Jan 16 22:47:12 2011 +0900

    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 465099f..c7e8f85 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 *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]