summaryrefslogtreecommitdiff
path: root/src/lib/eet/eet_lib.c
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 /src/lib/eet/eet_lib.c
parent06cd16548c1497bfd36316dfd9c96699b0549939 (diff)
eet: for more safety let eet handle the reference to the file.
Diffstat (limited to 'src/lib/eet/eet_lib.c')
-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 c1eeb4a436..b00324f8d0 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1450,7 +1450,7 @@ eet_mmap(Eina_File *file)
1450 INIT_FILE(ef); 1450 INIT_FILE(ef);
1451 ef->ed = NULL; 1451 ef->ed = NULL;
1452 ef->key = NULL; 1452 ef->key = NULL;
1453 ef->readfp = file; 1453 ef->readfp = eina_file_dup(file);
1454 ef->path = eina_stringshare_add(path); 1454 ef->path = eina_stringshare_add(path);
1455 ef->magic = EET_MAGIC_FILE; 1455 ef->magic = EET_MAGIC_FILE;
1456 ef->references = 1; 1456 ef->references = 1;
@@ -1462,7 +1462,7 @@ eet_mmap(Eina_File *file)
1462 ef->data_size = 0; 1462 ef->data_size = 0;
1463 ef->sha1 = NULL; 1463 ef->sha1 = NULL;
1464 ef->sha1_length = 0; 1464 ef->sha1_length = 0;
1465 ef->readfp_owned = EINA_FALSE; 1465 ef->readfp_owned = EINA_TRUE;
1466 1466
1467 ef->data_size = eina_file_size_get(file); 1467 ef->data_size = eina_file_size_get(file);
1468 ef->data = eina_file_map_all(file, EINA_FILE_SEQUENTIAL); 1468 ef->data = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);