discomfitor pushed a commit to branch master.

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

commit 2cf05bac099121529f2e1a5aa642365337a39a00
Author: Xavi Artigas <[email protected]>
Date:   Tue Jun 12 10:51:53 2018 -0400

    evas: Fix small string leak
    
    Summary:
    sscanf("%ms", &encoding) allocates memory which must be freed.
    It is done in the general case, but not if the image data map fails and the
    code jumps to the no_pixels: label.
    
    Reviewers: zmike, bu5hm4n
    
    Reviewed By: zmike
    
    Subscribers: cedric, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D6258
---
 src/lib/evas/canvas/evas_object_image.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index e9d5318a44..54d2fd50e4 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -982,6 +982,7 @@ _efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, 
Evas_Image_Data *o, c
    return ok;
 
 no_pixels:
+   free(encoding);
    ERR("Could not get image pixels for saving.");
    return EINA_FALSE;
 }

-- 


Reply via email to