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 <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 14:10:44 +01:00
parent 6198351629
commit 1140dbceeb
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}