xwayland: comment on cleanup_after_cairo()

I tried this, and it causes a crash. Leave a note for the future when we
happen to use some other backend with xwayland and find a "leak".

The reason this is a comment and not a Gitlab issue is that you probably
would not go looking for a Gitlab issue saying an idea is a bad one.
This comment is more likely to be found.

It's not really a leak either, it only needs to be fixed if you want a
clean ASan leak report.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2023-04-12 15:00:50 +03:00 committed by Pekka Paalanen
parent 741c9e6a99
commit eb2a12a92c

View File

@ -2949,6 +2949,14 @@ weston_wm_destroy(struct weston_wm *wm)
wl_list_remove(&wm->kill_listener.link);
wl_list_remove(&wm->create_surface_listener.link);
/*
* No, you cannot call cleanup_after_cairo() here, because Weston
* on wayland-backend would crash in an assert inside Cairo.
* Just rely on headless and wayland backends calling it.
*
* XXX: fix this for other backends.
*/
free(wm);
}