loader: unregister special event in loader_dri3_drawable_fini
This was inadvertently removed in 98a6cfd3953 and causes continuous
memory leaks as events are being received after the context has been
unbound.
Fixes: 3170b63314 ("loader: Add infrastructure for tracking active CRTC resources")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8238
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21128>
This commit is contained in:
@@ -357,6 +357,15 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
|
||||
for (i = 0; i < ARRAY_SIZE(draw->buffers); i++)
|
||||
dri3_free_render_buffer(draw, i);
|
||||
|
||||
if (draw->special_event) {
|
||||
xcb_void_cookie_t cookie =
|
||||
xcb_present_select_input_checked(draw->conn, draw->eid, draw->drawable,
|
||||
XCB_PRESENT_EVENT_MASK_NO_EVENT);
|
||||
|
||||
xcb_discard_reply(draw->conn, cookie.sequence);
|
||||
xcb_unregister_for_special_event(draw->conn, draw->special_event);
|
||||
}
|
||||
|
||||
if (draw->region)
|
||||
xcb_xfixes_destroy_region(draw->conn, draw->region);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user