From 5caef6d355f87af2e7f20372dc8c328faba53148 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 6 Nov 2019 12:07:23 +0200 Subject: [PATCH] colord: remove destroy listener on clean-up This was forgetting to remove the compositor destroy listener, which would lead to use-after-free on compositor tear-down especially on cms-colord init failure paths. Found by inspection. Signed-off-by: Pekka Paalanen --- compositor/cms-colord.c | 1 + 1 file changed, 1 insertion(+) diff --git a/compositor/cms-colord.c b/compositor/cms-colord.c index d68e377d..57a77f44 100644 --- a/compositor/cms-colord.c +++ b/compositor/cms-colord.c @@ -466,6 +466,7 @@ colord_module_destroy(struct cms_colord *cms) g_free(cms->pnp_ids_data); g_hash_table_unref(cms->pnp_ids); + wl_list_remove(&cms->destroy_listener.link); free(cms); }