forked from enlightenment/efl
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:
parent
8d71c338bd
commit
425986b4fe
|
@ -1436,7 +1436,11 @@ eet_mmap(Eina_File *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
ef = eet_cache_find(path, eet_readers, eet_readers_num);
|
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 */
|
/* Allocate struct for eet file and have it zero'd out */
|
||||||
ef = eet_file_malloc(1);
|
ef = eet_file_malloc(1);
|
||||||
|
@ -1470,7 +1474,6 @@ eet_mmap(Eina_File *file)
|
||||||
goto on_error;
|
goto on_error;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
ef->references++;
|
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
return ef;
|
return ef;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue