From 18eb1be4915603afc5efead1918dfa8ca744af46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 16 Sep 2024 15:09:11 +0200 Subject: [PATCH] window/x11: Use g_autoslist (MetaStrut) in meta_window_x11_update_struts The wrong type resulted in a crash when returning from the function, because g_slist_free was called instead of g_free for the old_struts list data pointers. Fixes: e005d035c0c1 ("boxes: Define cleanup function for MetaStrut and use auto-pointers") Part-of: --- src/x11/window-x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 947206059..b4a5472c6 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -1643,7 +1643,7 @@ meta_window_x11_move_resize_internal (MetaWindow *window, static gboolean meta_window_x11_update_struts (MetaWindow *window) { - g_autoslist (GSList) old_struts = NULL; + g_autoslist (MetaStrut) old_struts = NULL; GSList *new_struts; GSList *old_iter, *new_iter; uint32_t *struts = NULL;