evas - animated images. fix leak in not freeing the list of frames itself
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 30 Oct 2013 09:08:10 +0000 (18:08 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 30 Oct 2013 09:18:08 +0000 (18:18 +0900)
src/lib/evas/common/evas_image_main.c

index b9d64ce..1492d80 100644 (file)
@@ -291,16 +291,13 @@ _evas_common_rgba_image_delete(Image_Entry *ie)
 
    if (ie->animated.frames)
      {
-        Eina_List *l;
         Image_Entry_Frame *frame;
-        EINA_LIST_FOREACH(ie->animated.frames, l, frame)
+        
+        EINA_LIST_FREE(ie->animated.frames, frame)
           {
-           if (frame)
-             {
-                if (frame->data) free(frame->data);
-                if (frame->info) free(frame->info);
-                free (frame);
-             }
+             if (frame->data) free(frame->data);
+             if (frame->info) free(frame->info);
+             free(frame);
           }
      }
    if (ie->f && !ie->flags.given_mmap) eina_file_close(ie->f);