toplevel-capture: work around wlroots memory leak

This commit is contained in:
Consolatis 2026-04-04 17:36:38 +02:00
parent d9649d630a
commit d333ed5c9f

View file

@ -460,6 +460,16 @@ handle_toplevel_capture_request(struct wl_listener *listener, void *data)
} }
wlr_ext_foreign_toplevel_image_capture_source_manager_v1_request_accept( wlr_ext_foreign_toplevel_image_capture_source_manager_v1_request_accept(
request, view->capture.source); request, view->capture.source);
if (LAB_WLR_VERSION_LOWER(0, 20, 1)) {
/*
* Work around a memory leak in wlroots.
* See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5328
*
* TODO: remove once we start tracking wlroots 0.21.x or depend on >= 0.20.1
*/
free(request);
}
} }
void void