From: Pekka Paalanen Date: Wed, 6 Nov 2019 10:07:23 +0000 (+0200) Subject: colord: remove destroy listener on clean-up X-Git-Tag: upstream/9.0.0~265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5caef6d355f87af2e7f20372dc8c328faba53148;p=platform%2Fupstream%2Fweston.git 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 --- 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); }