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>
This commit is contained in:
parent
611b3b1d40
commit
4d586118c1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user