leak--
authorraster <raster>
Mon, 9 Jun 2008 03:07:35 +0000 (03:07 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 9 Jun 2008 03:07:35 +0000 (03:07 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/eet@34776 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eet_lib.c

index c102091..249d06f 100644 (file)
@@ -1252,11 +1252,8 @@ eet_open(const char *file, Eet_File_Mode mode)
        ef->data_size = file_stat.st_size;
        ef->data = mmap(NULL, ef->data_size, PROT_READ,
                        MAP_SHARED, fileno(ef->fp), 0);
-       if (ef->data == MAP_FAILED)
-         {
-            ef->data = NULL;
-            return NULL;
-         }
+       if (eet_test_close((ef->data == MAP_FAILED), ef))
+         return NULL;
        ef = eet_internal_read(ef);
        if (!ef)
          return NULL;