cedric pushed a commit to branch master.

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

commit 97e24931e38a0f341c5486c953a36c9df5425771
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Sun Apr 26 09:38:13 2015 +0200

    emile: correctly free buffer allocated for compressed image.
    
    CID 1295688
---
 src/lib/emile/emile_image.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index d0f35a1..018745c 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -497,8 +497,7 @@ _emile_tgv_data(Emile_Image *image,
             if (block_length == 0)
               {
                  *error = EMILE_IMAGE_LOAD_ERROR_CORRUPT_FILE;
-                 eina_binbuf_free(buffer);
-                 return EINA_FALSE;
+                 goto on_error;
               }
 
             data_start = eina_binbuf_manage_new(m + offset,
@@ -653,6 +652,7 @@ _emile_tgv_data(Emile_Image *image,
    r = EINA_TRUE;
 
 on_error:
+   if (image->compress) eina_binbuf_free(buffer);
    return r;
 }
 

-- 


Reply via email to