stanluk pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=2123a813459f291553303c29d834436d2058cb6c

commit 2123a813459f291553303c29d834436d2058cb6c
Author: Lukasz Stanislawski <l.stanisl...@samsung.com>
Date:   Mon May 4 11:45:06 2015 +0200

    gengrid: fix mem leak occuring when getting name from atspi interface
---
 src/lib/elm_gengrid.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index f22886e..696292c 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -4956,17 +4956,19 @@ 
_elm_gengrid_item_elm_interface_atspi_accessible_name_get(Eo *eo_it EINA_UNUSED,
 
         EINA_LIST_FREE(texts, key)
           {
-             char *s = it->itc->func.text_get
+             char *str_markup = it->itc->func.text_get
                 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
 
-             s = _elm_util_mkup_to_text(s);
+             char *str_utf8 = _elm_util_mkup_to_text(str_markup);
 
-             if (s)
+             free(str_markup);
+
+             if (str_utf8)
                {
                   if (eina_strbuf_length_get(buf) > 0)
                     eina_strbuf_append(buf, ", ");
-                  eina_strbuf_append(buf, s);
-                  free(s);
+                  eina_strbuf_append(buf, str_utf8);
+                  free(str_utf8);
                }
           }
      }

-- 


Reply via email to