summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file_win32.c
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-20 20:06:50 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-20 20:08:44 +0900
commit0cfb40b7fb03a96973fe27542b4a5a739eca4386 (patch)
tree5eccbd29cb2b096c80d4f15aff5cb3b339df49ff /src/lib/eina/eina_file_win32.c
parent4096a185232ce685db92b391d8a8cc241a090b2c (diff)
eina: cleanup file destruction and reintroduce EINA_MAGIC use.
Diffstat (limited to '')
-rw-r--r--src/lib/eina/eina_file_win32.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index cddf2da81a..7cb108d2a5 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -366,9 +366,6 @@ 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
372 EINA_LIST_FREE(file->dead_map, map) 369 EINA_LIST_FREE(file->dead_map, map)
373 { 370 {
374 UnmapViewOfFile(map->map); 371 UnmapViewOfFile(map->map);
@@ -380,8 +377,6 @@ eina_file_real_close(Eina_File *file)
380 377
381 if (file->fm) CloseHandle(file->fm); 378 if (file->fm) CloseHandle(file->fm);
382 if (file->handle) CloseHandle(file->handle); 379 if (file->handle) CloseHandle(file->handle);
383
384 free(file);
385} 380}
386 381
387static void 382static void
@@ -807,7 +802,7 @@ eina_file_open(const char *path, Eina_Bool shared)
807 { 802 {
808 file->delete_me = EINA_TRUE; 803 file->delete_me = EINA_TRUE;
809 eina_hash_del(_eina_file_cache, file->filename, file); 804 eina_hash_del(_eina_file_cache, file->filename, file);
810 eina_file_real_close(file); 805 eina_file_clean_close(file);
811 file = NULL; 806 file = NULL;
812 } 807 }
813 808
@@ -837,6 +832,8 @@ eina_file_open(const char *path, Eina_Bool shared)
837 n->shared = shared; 832 n->shared = shared;
838 eina_lock_new(&n->lock); 833 eina_lock_new(&n->lock);
839 eina_hash_direct_add(_eina_file_cache, n->filename, n); 834 eina_hash_direct_add(_eina_file_cache, n->filename, n);
835
836 EINA_MAGIC_SET(n, EINA_FILE_MAGIC);
840 } 837 }
841 else 838 else
842 { 839 {