devilhorns pushed a commit to branch master.

commit 461e406b91543b2037cba56a6e8e02889bba5741
Author: Chris Michael <[email protected]>
Date:   Mon Jul 8 08:43:24 2013 +0100

    Fix memleak reported by Coverity.
    
    NB: Fixes Coverity CID1039652
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/loaders/gif/evas_image_load_gif.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/loaders/gif/evas_image_load_gif.c
index 24993c7..fb186ef 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -798,6 +798,7 @@ evas_image_load_specific_frame(Eina_File *f,
    if (!gif_frame)
      {
         *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
+        free(frame);
         goto on_error;
      }
    frame->info = gif_frame;
@@ -805,6 +806,8 @@ evas_image_load_specific_frame(Eina_File *f,
    if (!_evas_image_load_frame(f, opts, prop, animated, gif, frame, 
LOAD_FRAME_DATA_INFO, error))
      {
         *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
+        free(gif_frame);
+        free(frame);
         goto on_error;
      }
 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to