evas: no loader should ever close an Eina_File anymore.
authorCedric BAIL <cedric.bail@samsung.com>
Fri, 20 Dec 2013 05:39:57 +0000 (14:39 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Fri, 20 Dec 2013 06:10:16 +0000 (15:10 +0900)
This would lead to some crash in EFM if relying on Evas to find the file format by
trying all its loader.

This should fix T674 and T668.

src/modules/evas/loaders/pmaps/evas_image_load_pmaps.c

index 50d1226..0a15181 100644 (file)
@@ -170,8 +170,6 @@ pmaps_buffer_open(Pmaps_Buffer *b, Eina_File *f, Eina_Bool header, int *error)
    if (!b->map)
      {
         *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
-        eina_file_close(b->file);
-        b->file = NULL;
         return EINA_FALSE;
      }
 
@@ -187,9 +185,7 @@ pmaps_buffer_open(Pmaps_Buffer *b, Eina_File *f, Eina_Bool header, int *error)
      {
        *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
         eina_file_map_free(b->file, b->map);
-        eina_file_close(b->file);
         b->map = NULL;
-        b->file = NULL;
        return EINA_FALSE;
      }