From: Michelle Legrand Date: Fri, 13 Feb 2015 13:33:58 +0000 (+0100) Subject: eina: win32 release lock in case of error X-Git-Tag: v1.14.0-alpha1~273 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6d870b4c13a1cf44bf35f1e66126ff7054d5957;p=platform%2Fupstream%2Fefl.git eina: win32 release lock in case of error 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 --- diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c index efdb8eb..b515a68 100644 --- 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);