From 97c8ad7c65f397368867310308c96c59b59ef2bd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 1 Mar 2023 16:06:37 +0100 Subject: backend/wayland: fix leak of some globals Fix a few globals which weren't properly cleaned up. Discovered in [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3604 --- backend/wayland/backend.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index cd1c6a4d..b4bacf12 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -485,18 +485,27 @@ static void backend_destroy(struct wlr_backend *backend) { destroy_wl_seat(seat); } + if (wl->activation_v1) { + xdg_activation_v1_destroy(wl->activation_v1); + } if (wl->zxdg_decoration_manager_v1) { zxdg_decoration_manager_v1_destroy(wl->zxdg_decoration_manager_v1); } if (wl->zwp_pointer_gestures_v1) { zwp_pointer_gestures_v1_destroy(wl->zwp_pointer_gestures_v1); } + if (wl->tablet_manager) { + zwp_tablet_manager_v2_destroy(wl->tablet_manager); + } if (wl->presentation) { wp_presentation_destroy(wl->presentation); } if (wl->zwp_linux_dmabuf_v1) { zwp_linux_dmabuf_v1_destroy(wl->zwp_linux_dmabuf_v1); } + if (wl->legacy_drm != NULL) { + wl_drm_destroy(wl->legacy_drm); + } if (wl->shm) { wl_shm_destroy(wl->shm); } -- cgit v1.2.3