diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2016-08-02 11:24:41 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2016-09-23 08:48:39 +0200 |
commit | 6857ed1a9c61aee5ede78c0b0bc9a007a6bb9b9e (patch) | |
tree | 0e08a9fc8c563330dfaaebb610ea9c2bd8506c55 | |
parent | 3aac561cf8558ac6b5c133e6697b73c58f5aa061 (diff) |
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@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 4d586118c113f3c0a6e95ed2d3fc7f9d03a4e362)
-rw-r--r-- | hw/xwayland/xwayland-cursor.c | 2 | ||||
-rw-r--r-- | hw/xwayland/xwayland.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c index 74dfe4e7e..7d14a3d52 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 16cc51d21..a570589be 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -362,6 +362,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; } |