summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file.c
diff options
context:
space:
mode:
authorAl Poole <netstar@gmail.com>2017-11-30 13:57:25 +0000
committerAl Poole <netstar@gmail.com>2017-11-30 13:57:25 +0000
commita538f478545e094ae4f158aaf6293ccef4bfb99d (patch)
treeea32737c0cc0c8a70b86802cea7d8cdd0ee25cb9 /src/lib/eina/eina_file.c
parent5b113aaa38a09454f60b4b4423e9b908002c53a6 (diff)
eina_file: make sure we use a stringshare when virtualized.
As the filename is now a stringshare, also make sure virtual files use stringshares for the filename! Also when unmapping we still need to test whether it is copied or not as unmap will break on less tolerant architectures. @fix T6449
Diffstat (limited to 'src/lib/eina/eina_file.c')
-rw-r--r--src/lib/eina/eina_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index d56612f..bf02410 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -300,7 +300,7 @@ eina_file_real_close(Eina_File *file)
300 300
301 if (file->fd != -1) 301 if (file->fd != -1)
302 { 302 {
303 if (file->global_map != MAP_FAILED) 303 if (!file->copied && file->global_map != MAP_FAILED)
304 munmap(file->global_map, file->length); 304 munmap(file->global_map, file->length);
305 close(file->fd); 305 close(file->fd);
306 } 306 }