devilhorns pushed a commit to branch master.

commit 1140dbceeb7838925d59e1f90829edebdd53612f
Author: Chris Michael <[email protected]>
Date:   Mon Jul 8 14:10:44 2013 +0100

    Add missing eina_lock_release when we exit
    
    Since we take the lock at the start of the function, we should release
    the mutex lock if we are going to return.
    
    NB: Fixes Coverity CID1039381
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/engines/gl_common/evas_gl_preload.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_preload.c 
b/src/modules/evas/engines/gl_common/evas_gl_preload.c
index 9a75305..6744130 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_preload.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_preload.c
@@ -127,7 +127,11 @@ _evas_gl_preload_lock(void)
         eina_condition_signal(&async_loader_cond);
 
         eina_condition_wait(&async_loader_cond);
-        if (async_loader_exit) return EINA_FALSE;
+        if (async_loader_exit) 
+          {
+             eina_lock_release(&async_loader_lock);
+             return EINA_FALSE;
+          }
 
         async_gl_make_current(async_engine_data, async_engine_data);
      }

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to