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>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent d2b9b5d1cc
commit 5caef6d355
  1. 1
      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);
}

Loading…
Cancel
Save