summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-06-04 15:03:47 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-06-04 15:04:19 +0900
commitdba4a080d9e365740b63b2f476f8430c364aea86 (patch)
treee8a561e024581062dfe4ccc2073a31bfcd7e8b2d
parent06cd16548c1497bfd36316dfd9c96699b0549939 (diff)
eet: for more safety let eet handle the reference to the file.
-rw-r--r--src/lib/eet/eet_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index c1eeb4a43..b00324f8d 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1450,7 +1450,7 @@ eet_mmap(Eina_File *file)
INIT_FILE(ef);
ef->ed = NULL;
ef->key = NULL;
- ef->readfp = file;
+ ef->readfp = eina_file_dup(file);
ef->path = eina_stringshare_add(path);
ef->magic = EET_MAGIC_FILE;
ef->references = 1;
@@ -1462,7 +1462,7 @@ eet_mmap(Eina_File *file)
ef->data_size = 0;
ef->sha1 = NULL;
ef->sha1_length = 0;
- ef->readfp_owned = EINA_FALSE;
+ ef->readfp_owned = EINA_TRUE;
ef->data_size = eina_file_size_get(file);
ef->data = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);