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 <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2019-11-06 12:07:23 +02:00 committed by Daniel Stone
parent d2b9b5d1cc
commit 5caef6d355
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}