raster pushed a commit to branch efl-1.20.

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

commit eb7053a6728e4e92c522b244a519ef03abca59f5
Author: Youngbok Shin <[email protected]>
Date:   Fri Oct 13 11:55:02 2017 -0700

    edje_cc: fix a memory leak issue when edje_cc writes images
    
    Summary:
    If there is no given pathes for image files as parameter of edje_cc,
    "img_dirs" will be NULL. Then, a local variable "load_err" is always
    EVAS_LOAD_ERROR_NONE. Because of this, the "if" condition just after
    EINA_LIST_FOREACH() will fail. It causes memory leak from "iw".
    @fix
    
    Test Plan: N/A
    
    Reviewers: raster, cedric, jpeg, woohyun
    
    Differential Revision: https://phab.enlightenment.org/D5285
    
    Signed-off-by: Cedric Bail <[email protected]>
---
 src/bin/edje/edje_cc_out.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 391e46cc9f..d793cacc8b 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -1390,7 +1390,7 @@ data_write_images(Eet_File *ef, int *image_num)
                   break;
                }
           }
-        if (load_err != EVAS_LOAD_ERROR_NONE)
+        if (!img_dirs || (load_err != EVAS_LOAD_ERROR_NONE))
           {
              evas_object_image_file_set(im, img->entry, NULL);
              load_err = evas_object_image_load_error_get(im);

-- 


Reply via email to