v3d: add missing unlock() in error path
authorEric Engestrom <eric@engestrom.ch>
Fri, 29 May 2020 18:19:22 +0000 (20:19 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sat, 13 Jun 2020 00:45:47 +0000 (00:45 +0000)
CoverityID: 1435701
Fixes: e5a81ac70431502bc592 ("broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5263>

src/gallium/drivers/v3d/v3d_bufmgr.c

index 31a08036b384de96cf4932ce618284d24b509143..dd8a2e986111bde8bb262bb30c6dfd7916e9851f 100644 (file)
@@ -367,7 +367,8 @@ v3d_bo_open_handle(struct v3d_screen *screen,
                         strerror(errno));
                 free(bo->map);
                 free(bo);
-                return NULL;
+                bo = NULL;
+                goto done;
         }
         bo->offset = get.offset;
         assert(bo->offset != 0);