From f1f44898224a48e30bd9be3c7c0ebe1425c0d4bc Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 30 Jun 2015 18:33:00 -0400 Subject: [PATCH] free all ec->comp_data ptrs in _e_client_del need this to live through multiple del hooks, so simplify all code by freeing in one place --- src/bin/e_client.c | 1 + src/bin/e_comp_wl.c | 1 - src/bin/e_comp_x.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 3e35b82..1833adb 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -621,6 +621,7 @@ _e_client_del(E_Client *ec) E_FREE_FUNC(ec->ping_poller, ecore_poller_del); /* must be called before parent/child clear */ _e_client_hook_call(E_CLIENT_HOOK_DEL, ec); + E_FREE(ec->comp_data); if ((!ec->new_client) && (!stopping)) _e_client_event_simple(ec, E_EVENT_CLIENT_REMOVE); diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 284720b..1487f4c 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2168,7 +2168,6 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) if (ec->comp_data->surface) wl_resource_set_user_data(ec->comp_data->surface, NULL); - E_FREE(ec->comp_data); if (ec->internal_elm_win) _e_comp_wl_surface_render_stop(ec); _e_comp_wl_focus_check(); diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 329ed49..6c3279f 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -4361,7 +4361,6 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec) } if (cd) E_FREE_FUNC(cd->first_draw_delay, ecore_timer_del); - E_FREE(cd); if (post_clients) post_clients = eina_list_remove(post_clients, ec); -- 2.7.4