Coverity (CID
1358496) warns that the cleanup code doesn't unlock the
mutex (which is arguably kind of stupid, since the only case that can
happen is when mtx_unlock() failed!). But, mtx_unlock() isn't going to
fail -- the mutex was locked by this thread just a few lines above it.
ret = cnd_wait(&dri2_sync->cond, &dri2_sync->mutex);
- if (mtx_unlock(&dri2_sync->mutex)) {
- ret = EGL_FALSE;
- goto cleanup;
- }
+ mtx_unlock(&dri2_sync->mutex);
if (ret) {
_eglError(EGL_BAD_PARAMETER, "eglClientWaitSyncKHR");
ret = cnd_timedwait(&dri2_sync->cond, &dri2_sync->mutex, &expire);
- if (mtx_unlock(&dri2_sync->mutex)) {
- ret = EGL_FALSE;
- goto cleanup;
- }
+ mtx_unlock(&dri2_sync->mutex);
if (ret)
if (ret == thrd_busy) {