Commit 4d586118 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Adam Jackson

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=97065Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent 611b3b1d
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment