raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=83397e1bde51830016e9a0f8e6482fc91bb4c50c

commit 83397e1bde51830016e9a0f8e6482fc91bb4c50c
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Jan 30 08:55:28 2014 +0900

    fix segv where comp_data is null but still accessed
    
    it seems i have an override-redirect window just off the bottom-right
    of my screen - i think its the scim input panel status. what happens
    is it is "managed" by comp but then deleted (_e_comp_x_hook_client_del
    called), BUT _e_comp_x_object_add is called with a deferred event for
    that client to add it again (likely this is a race) which finds he
    client in a state of not having comp_data as the E_FREE in
    _e_comp_x_hook_client_del() frees it and sets it to NULL. move the
    comp_data free to the actual client free (which is the last time a
    client is valid at all) solves this.
---
 src/bin/e_client.c | 1 +
 src/bin/e_comp_x.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index eb891f8..74b3491 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -474,6 +474,7 @@ _e_client_free(E_Client *ec)
 
    e_hints_client_list_set();
    evas_object_del(ec->frame);
+   E_FREE(ec->comp_data);
    free(ec);
 }
 
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index dc90457..6f6b979 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -4178,7 +4178,6 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client 
*ec)
         ec->parent->modal = NULL;
      }
    E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del);
-   E_FREE(ec->comp_data);
    if (post_clients)
      post_clients = eina_list_remove(post_clients, ec);
 

-- 


Reply via email to