stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=39eb3004f83f2ca15cc729a72929d2ba48ab5779

commit 39eb3004f83f2ca15cc729a72929d2ba48ab5779
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Mon Apr 18 12:55:05 2016 +0200

    elm_spinner: free string in all cases before returning
    
    If len < max_len was true here we leaked new_str. Make sure we also free it
    in this case.
    
    CID: 1353605
---
 src/lib/elementary/elm_spinner.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index bca36b0..c6bd8de 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -553,7 +553,11 @@ _min_max_validity_filter(void *data, Evas_Object *obj, 
char **text)
 
    max_len = log10(fabs(sd->val_max)) + 1;
    len = evas_string_char_len_get(new_str);
-   if (len < max_len) return;
+   if (len < max_len)
+     {
+        ELM_SAFE_FREE(new_str, free);
+        return;
+     }
 
    val = strtod(new_str, NULL);
    ELM_SAFE_FREE(new_str, free);

-- 


Reply via email to