[gtk+] gdk: Don't leak discarded window state event



commit f8bbbbf684906d30ccd0b25e043a9dea84fa496e
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Mar 11 13:13:31 2016 +0800

    gdk: Don't leak discarded window state event
    
    When compressing window state events, we didn't free the discarded
    event after removing it from the queue, causing us to leak it. This
    commit makes sure to free the discarded event after unqueuing it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762468

 gdk/gdkevents.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index a094d4a..6a6771c 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -2201,6 +2201,7 @@ _gdk_set_window_state (GdkWindow      *window,
     {
       old = window->old_state;
       _gdk_event_queue_remove_link (display, pending_event_link);
+      gdk_event_free (pending_event_link->data);
       g_list_free_1 (pending_event_link);
     }
   else


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