From 4c7dbe6ab271a7d7605247d7c0904330d2daa71b Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 31 May 2021 18:28:35 +0300 Subject: [PATCH] xwayland/window-manager: Handle theme destruction Memleak found by ASAN: Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7fe7a917fe8f in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f) #1 0x7fe7a5a40736 in theme_create ../shared/cairo-util.c:419 #2 0x7fe7a5a3363c in weston_wm_create ../xwayland/window-manager.c:2619 #3 0x7fe7a5a2017e in weston_xwayland_xserver_loaded ../xwayland/launcher.c:313 #4 0x7fe7a90b4d14 in handle_sigusr1 ../compositor/xwayland.c:57 #5 0x7fe7a8c2585d in wl_event_source_signal_dispatch ../src/event-loop.c:685 #6 0x7ffcdb04ef6f ([stack]+0x1df6f) Signed-off-by: Marius Vlad --- xwayland/window-manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index de868218..c17b53c5 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -2668,6 +2668,7 @@ weston_wm_destroy(struct weston_wm *wm) /* FIXME: Free windows in hash. */ hash_table_destroy(wm->window_hash); weston_wm_destroy_cursors(wm); + theme_destroy(wm->theme); xcb_disconnect(wm->conn); wl_event_source_remove(wm->source); wl_list_remove(&wm->selection_listener.link);