diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-08 21:38:01 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-08 22:37:09 +0200 |
commit | 2e5a5d6656e9fca4ee756819dcd17e875225e447 (patch) | |
tree | e0b34eea8161ff29ae2ecb6d855fbb2504985757 | |
parent | dc7910a7efaef2cdad999c2e46d92f551924cf5e (diff) | |
download | efl-2e5a5d6656e9fca4ee756819dcd17e875225e447.tar.gz |
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
-rw-r--r-- | src/lib/eet/eet_lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index 69d8bca670..daa6d3b897 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c @@ -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; |