raster pushed a commit to branch master.

commit 02d959617827013c0817d0898115e65dc9ad0280
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Tue Jun 4 19:18:43 2013 +0900

    fix ibar exe watcher segv hole.
    
    i got a segv with ibar and exe instance watching. a watcher was still
    active even tho ic was freed (i think)... i don't know the
    reproduction steps, but i think this is a hole.. so plug it.
---
 src/modules/ibar/e_mod_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 5011e19..e53ddb7 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -671,6 +671,7 @@ _ibar_icon_free(IBar_Icon *ic)
    evas_object_del(ic->o_holder2);
    if (ic->exe_inst)
      {
+        e_exec_instance_watcher_del(ic->exe_inst, _ibar_instance_watch, ic);
         ic->exe_inst = NULL;
      }
    E_FREE(ic);
@@ -1122,7 +1123,7 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, 
E_Exec_Watch_Type type)
         e_exec_instance_watcher_del(inst, _ibar_instance_watch, ic);
         ic->exes = eina_list_remove(ic->exes, inst);
         if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,off", "e");
-        ic->exe_inst = NULL;
+        if (ic->exe_inst == inst) ic->exe_inst = NULL;
         break;
       case E_EXEC_WATCH_STARTED:
         _ibar_icon_signal_emit(ic, "e,state,started", "e");

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to