From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:09:53 +0000 (+0200) Subject: multirect: remove destroy listener before freeing X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=750d37b16c8e0dd5478f94aa26ab07b84dacef93;p=proto%2Flabwc.git multirect: remove destroy listener before freeing Detected by `-Db_sanitize=address,undefined` for libwayland --- diff --git a/src/common/graphic-helpers.c b/src/common/graphic-helpers.c index 5c754b30..0ecdd697 100644 --- a/src/common/graphic-helpers.c +++ b/src/common/graphic-helpers.c @@ -14,6 +14,7 @@ static void multi_rect_destroy_notify(struct wl_listener *listener, void *data) { struct multi_rect *rect = wl_container_of(listener, rect, destroy); + wl_list_remove(&rect->destroy.link); free(rect); }