discomfitor pushed a commit to branch enlightenment-0.20.

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

commit bc5d9ecb03008bb98e93bd4f72197fe6411592c1
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Mar 8 13:45:59 2016 +0900

    e xkbswitch: don't free layouts that are just pointed to in instances
    
    we free the instance layout even though tthis is never duplicated but
    jhust set to point to the current_layout. don't free it as this causes
    a double-free. this fixes a crash here.
    
    @fix
---
 src/modules/xkbswitch/e_mod_main.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/modules/xkbswitch/e_mod_main.c 
b/src/modules/xkbswitch/e_mod_main.c
index 9df61a4..bef0181 100644
--- a/src/modules/xkbswitch/e_mod_main.c
+++ b/src/modules/xkbswitch/e_mod_main.c
@@ -141,10 +141,7 @@ _xkb_update_icon(int cur_group)
         EINA_LIST_FOREACH(instances, l, inst)
           {
              if (!e_config_xkb_layout_eq(e_config->xkb.current_layout, 
inst->layout))
-               {
-                  e_config_xkb_layout_free(inst->layout);
-                  inst->layout = e_config->xkb.current_layout;
-               }
+               inst->layout = e_config->xkb.current_layout;
              E_FREE_FUNC(inst->o_xkbflag, evas_object_del);
              e_theme_edje_object_set(inst->o_xkbswitch,
                                      "base/theme/modules/xkbswitch",
@@ -158,10 +155,7 @@ _xkb_update_icon(int cur_group)
         EINA_LIST_FOREACH(instances, l, inst)
           {
              if (!e_config_xkb_layout_eq(e_config->xkb.current_layout, 
inst->layout))
-               {
-                  e_config_xkb_layout_free(inst->layout);
-                  inst->layout = e_config->xkb.current_layout;
-               }
+               inst->layout = e_config->xkb.current_layout;
              if (!inst->o_xkbflag)
                inst->o_xkbflag = e_icon_add(inst->gcc->gadcon->evas);
              e_theme_edje_object_set(inst->o_xkbswitch,

-- 


Reply via email to