raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6f751ab9f1a0b3b37e4e56df8f78f5ddc948f33f

commit 6f751ab9f1a0b3b37e4e56df8f78f5ddc948f33f
Author: Amitesh Singh <amitesh...@samsung.com>
Date:   Fri May 1 14:32:34 2015 +0900

    entry: Fix memory leak.
    
    Summary:
    This fixes memory leak in case of txt is NULL
    
    @Fix
    
    Signed-off-by: Amitesh Singh <amitesh...@samsung.com>
    
    Reviewers: seoz, raster, Hermet
    
    Subscribers: seoz, sachin.dev
    
    Differential Revision: https://phab.enlightenment.org/D2459
---
 src/lib/elm_entry.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 684bc06..9e2e743 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -3009,10 +3009,15 @@ _access_info_cb(void *data EINA_UNUSED, Evas_Object 
*obj)
 
    txt = elm_widget_access_info_get(obj);
 
-   if (!txt) txt = _elm_util_mkup_to_text(elm_entry_entry_get(obj));
-   if (txt) return strdup(txt);
-
-   return NULL;
+   if (!txt)
+     {
+        char *ret, *ret2;
+        ret = _elm_util_mkup_to_text(elm_entry_entry_get(obj));
+        ret2 = strdup(ret);
+        free(ret);
+        return ret2;
+     }
+   else return strdup(txt);
 }
 
 static char *

-- 


Reply via email to