From 88036ebf2e684546a0f1d31ab4acc1791403a7f0 Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Tue, 6 Sep 2016 13:49:44 +0900 Subject: [PATCH] e_comp_wl: fixed a crash when destroying an wl_client. The crash occurs when trying to destroy wl_client which is disconnected. In this case, E_Client was already deleted but wl_callback resource is not destroyed because it is in ec->comp_data->pending.frames list and E_Client didn't clean up its pending.frames list when freeing. Change-Id: I7371dfaad38cfe757d0477674baa10e981bf4591 --- src/bin/e_comp_wl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 0733ca48d8..3aa95751cd 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2655,6 +2655,7 @@ _e_comp_wl_frame_cb_destroy(struct wl_resource *resource) E_Client *ec; if (!(ec = wl_resource_get_user_data(resource))) return; + if (e_object_is_del(E_OBJECT(ec))) return; ec->comp_data->frames = eina_list_remove(ec->comp_data->frames, resource); @@ -4015,6 +4016,9 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) EINA_LIST_FREE(ec->comp_data->frames, cb) wl_resource_destroy(cb); + EINA_LIST_FREE(ec->comp_data->pending.frames, cb) + wl_resource_destroy(cb); + if (ec->comp_data->surface) wl_resource_set_user_data(ec->comp_data->surface, NULL); -- 2.34.1