egl: Fix missing unlock in eglGetSyncAttribKHR
authorChad Versace <chadversary@chromium.org>
Wed, 28 Sep 2016 06:06:37 +0000 (23:06 -0700)
committerChad Versace <chadversary@chromium.org>
Tue, 4 Oct 2016 21:11:22 +0000 (14:11 -0700)
On the error path, eglGetSyncAttribKHR neglected to unlock the
EGLDisplay before returning.

Fixes deadlock in dEQP-EGL.functional.fence_sync.invalid.get_invalid_value.

Cc: mesa-stable@lists.freedesktop.org
Cc: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/main/eglapi.c

index 1c62a8049e4c47a4c87e57ec3a1131a8d5c0e514..44fc0b83fadaaab84c3105b344991ed327688aaf 100644 (file)
@@ -1602,7 +1602,7 @@ eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *valu
    EGLBoolean result;
 
    if (!value)
-      RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, EGL_FALSE);
+      RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
 
    attrib = *value;
    result = _eglGetSyncAttribCommon(disp, s, attribute, &attrib);