projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0b6f87
)
eina: win32 release lock in case of error
author
Michelle Legrand
<legrand.michelle@outlook.com>
Fri, 13 Feb 2015 13:33:58 +0000
(14:33 +0100)
committer
Cedric BAIL
<cedric@osg.samsung.com>
Thu, 12 Mar 2015 06:43:58 +0000
(07:43 +0100)
Summary:
It's better to realese the lock before returning NULL. Otherwise the program
is waiting indefinitely then crashing on Windows ("program not responding").
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/eina/eina_file_win32.c
patch
|
blob
|
history
diff --git
a/src/lib/eina/eina_file_win32.c
b/src/lib/eina/eina_file_win32.c
index
efdb8eb
..
b515a68
100644
(file)
--- a/
src/lib/eina/eina_file_win32.c
+++ b/
src/lib/eina/eina_file_win32.c
@@
-873,7
+873,10
@@
eina_file_map_all(Eina_File *file, Eina_File_Populate rule EINA_UNUSED)
file->fm = CreateFileMapping(file->handle, NULL, PAGE_READONLY,
max_size_high, max_size_low, NULL);
if (!file->fm)
- return NULL;
+ {
+ eina_lock_release(&file->lock);
+ return NULL;
+ }
data = MapViewOfFile(file->fm, FILE_MAP_READ,
0, 0, file->length);