xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Aug 15 16:50:06 UTC 2016


 hw/xwayland/xwayland-cursor.c |    2 ++
 hw/xwayland/xwayland.c        |    2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 4d586118c113f3c0a6e95ed2d3fc7f9d03a4e362
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Tue Aug 2 11:24:41 2016 +0200

    xwayland: Plug memleak in frame callbacks
    
    The frame callback set up via wl_surface_frame() needs to be freed with
    wl_callback_destroy() or we'll leak memory.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97065
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Daniel Stone <daniels at collabora.com>

diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index 74dfe4e..7d14a3d 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -100,6 +100,8 @@ frame_callback(void *data,
                uint32_t time)
 {
     struct xwl_seat *xwl_seat = data;
+
+    wl_callback_destroy (xwl_seat->cursor_frame_cb);
     xwl_seat->cursor_frame_cb = NULL;
     if (xwl_seat->cursor_needs_update) {
         xwl_seat->cursor_needs_update = FALSE;
diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
index c65a22f..97d998e 100644
--- a/hw/xwayland/xwayland.c
+++ b/hw/xwayland/xwayland.c
@@ -364,6 +364,8 @@ frame_callback(void *data,
                uint32_t time)
 {
     struct xwl_window *xwl_window = data;
+
+    wl_callback_destroy (xwl_window->frame_callback);
     xwl_window->frame_callback = NULL;
 }
 


More information about the xorg-commit mailing list