summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2023-04-12 15:00:50 +0300
committerPekka Paalanen <pq@iki.fi>2023-04-12 12:34:58 +0000
commiteb2a12a92ca54a60ca88a5b3fa0521982a83a5ac (patch)
treec05320f04042cd756e8d6c7a4749f32b6970b1b5
parent741c9e6a991773462ae35c0b728be541772f7804 (diff)
downloadweston-eb2a12a92ca54a60ca88a5b3fa0521982a83a5ac.tar.gz
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>
-rw-r--r--xwayland/window-manager.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 9f1f6b60..378c0123 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -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);
}