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)
|
if (!ef)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
/* eet_internal_read expects the cache lock to be held when it is called */
|
||||||
|
LOCK_CACHE;
|
||||||
|
|
||||||
INIT_FILE(ef);
|
INIT_FILE(ef);
|
||||||
ef->ed = NULL;
|
ef->ed = NULL;
|
||||||
ef->path = NULL;
|
ef->path = NULL;
|
||||||
|
@ -1413,8 +1416,6 @@ eet_memopen_read(const void *data,
|
||||||
ef->sha1_length = 0;
|
ef->sha1_length = 0;
|
||||||
ef->readfp_owned = EINA_FALSE;
|
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);
|
ef = eet_internal_read(ef);
|
||||||
UNLOCK_CACHE;
|
UNLOCK_CACHE;
|
||||||
return ef;
|
return ef;
|
||||||
|
|
Loading…
Reference in New Issue