summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file_win32.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-20 10:11:21 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-20 10:22:00 +0100
commit8a3e021298c8d7ebf8cb587554422aa6a93edcc9 (patch)
tree45cc7cf656e4b7f947bff2e5f4aeb313d0553e54 /src/lib/eina/eina_file_win32.c
parent4eb4307aa2b847e73924aa67a055294d2533090b (diff)
Revert "eina: fix a possible race condition during eina_file_close."
it breaks everything This reverts commit 7e8fb93206ee95945bb757267832537c13ab4287.
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_file_win32.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index 8290501869..cddf2da81a 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -366,6 +366,9 @@ eina_file_real_close(Eina_File *file)
366{ 366{
367 Eina_File_Map *map; 367 Eina_File_Map *map;
368 368
369 eina_hash_free(file->rmap);
370 eina_hash_free(file->map);
371
369 EINA_LIST_FREE(file->dead_map, map) 372 EINA_LIST_FREE(file->dead_map, map)
370 { 373 {
371 UnmapViewOfFile(map->map); 374 UnmapViewOfFile(map->map);
@@ -377,6 +380,8 @@ eina_file_real_close(Eina_File *file)
377 380
378 if (file->fm) CloseHandle(file->fm); 381 if (file->fm) CloseHandle(file->fm);
379 if (file->handle) CloseHandle(file->handle); 382 if (file->handle) CloseHandle(file->handle);
383
384 free(file);
380} 385}
381 386
382static void 387static void
@@ -832,8 +837,6 @@ eina_file_open(const char *path, Eina_Bool shared)
832 n->shared = shared; 837 n->shared = shared;
833 eina_lock_new(&n->lock); 838 eina_lock_new(&n->lock);
834 eina_hash_direct_add(_eina_file_cache, n->filename, n); 839 eina_hash_direct_add(_eina_file_cache, n->filename, n);
835
836 EINA_MAGIC_SET(n, EINA_FILE_MAGIC);
837 } 840 }
838 else 841 else
839 { 842 {