do not make eet files get refcounts of 2 on eet_mmap so they then never free.

we set references to 1 then on success references++... thus ALWAYS
being on 2.
This commit is contained in:
Carsten Haitzler 2013-05-10 08:54:50 +09:00
parent 8d71c338bd
commit 425986b4fe
1 changed files with 5 additions and 2 deletions

View File

@ -1436,7 +1436,11 @@ eet_mmap(Eina_File *file)
}
ef = eet_cache_find(path, eet_readers, eet_readers_num);
if (ef && ef->readfp == file) goto done;
if (ef && ef->readfp == file)
{
ef->references++;
goto done;
}
/* Allocate struct for eet file and have it zero'd out */
ef = eet_file_malloc(1);
@ -1470,7 +1474,6 @@ eet_mmap(Eina_File *file)
goto on_error;
done:
ef->references++;
UNLOCK_CACHE;
return ef;