From be78557daecde82ae770f91acdfde51bf16e90dd Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 8 Apr 2024 07:52:37 +0100 Subject: [PATCH] win: fix leak of damaged regions of windows Signed-off-by: Yuxuan Shui --- src/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win.c b/src/win.c index d28bacdd..46aa6ebb 100644 --- a/src/win.c +++ b/src/win.c @@ -1568,6 +1568,7 @@ void free_win_res(session_t *ps, struct managed_win *w) { // Above should be done during unmapping // Except when we are called by session_destroy + pixman_region32_fini(&w->damaged); pixman_region32_fini(&w->bounding_shape); // BadDamage may be thrown if the window is destroyed set_ignore_cookie(&ps->c, xcb_damage_destroy(ps->c.c, w->damage)); @@ -2180,7 +2181,6 @@ void destroy_win_finish(session_t *ps, struct win *w) { w2->prev_trans = NULL; } } - pixman_region32_fini(&mw->damaged); } free(w);