[gtk+] gdkdisplay-x11: Plug memory leak



commit af958b86cb3126cf6178d1d9e95948c2ae66cf71
Author: Timm Bäder <mail baedert org>
Date:   Mon Jan 18 17:22:09 2016 +0100

    gdkdisplay-x11: Plug memory leak

 gdk/x11/gdkdisplay-x11.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 8ab6219..f600b9b 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2934,7 +2934,12 @@ gdk_x11_display_get_default_seat (GdkDisplay *display)
       pointer = gdk_seat_get_pointer (l->data);
 
       if (gdk_x11_device_get_id (pointer) == device_id)
-        return l->data;
+        {
+          GdkSeat *seat = l->data;
+          g_list_free (seats);
+
+          return seat;
+        }
     }
 
   g_list_free (seats);


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