st/va: add missing mutex_unlock
authorEric Engestrom <eric@engestrom.ch>
Sun, 21 Aug 2016 21:11:48 +0000 (22:11 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 24 Aug 2016 08:33:07 +0000 (10:33 +0200)
Fixes: c59628d11b134fc01638 ("st/va: enable dual instances encode by sync surface")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/surface.c

index 012e48eb32f2c51bf64e9e44bd33a146568b6a7b..3ee1cdda426bf280937162645393d4ad94cfde03 100644 (file)
@@ -106,8 +106,10 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target)
    pipe_mutex_lock(drv->mutex);
    surf = handle_table_get(drv->htab, render_target);
 
-   if (!surf || !surf->buffer)
+   if (!surf || !surf->buffer) {
+      pipe_mutex_unlock(drv->mutex);
       return VA_STATUS_ERROR_INVALID_SURFACE;
+   }
 
    context = handle_table_get(drv->htab, surf->ctx);
    if (!context) {