forked from enlightenment/efl
eet: call LOCK_CACHE before altering Eet_File
even if not necessary in this particular case, do as in eet_mmap() and eet_open(), lock the cache before altering Eet_File struct. fix CID 1039366 1039367 1039368 1039369
This commit is contained in:
parent
dc7910a7ef
commit
2e5a5d6656
|
@ -1397,6 +1397,9 @@ eet_memopen_read(const void *data,
|
|||
if (!ef)
|
||||
return NULL;
|
||||
|
||||
/* eet_internal_read expects the cache lock to be held when it is called */
|
||||
LOCK_CACHE;
|
||||
|
||||
INIT_FILE(ef);
|
||||
ef->ed = NULL;
|
||||
ef->path = NULL;
|
||||
|
@ -1413,8 +1416,6 @@ eet_memopen_read(const void *data,
|
|||
ef->sha1_length = 0;
|
||||
ef->readfp_owned = EINA_FALSE;
|
||||
|
||||
/* eet_internal_read expects the cache lock to be held when it is called */
|
||||
LOCK_CACHE;
|
||||
ef = eet_internal_read(ef);
|
||||
UNLOCK_CACHE;
|
||||
return ef;
|
||||
|
|
Loading…
Reference in New Issue