mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
frontends/va: Fix missing unlock
Fix defect reported by Coverity Scan. Missing unlock (LOCK) missing_unlock: Returning without unlocking drv->mutex. Fixes:af695149e9("frontends/va: pass in film_grain_target as new output") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23488> (cherry picked from commite1d948b6a2)
This commit is contained in:
parent
631fa4a8d6
commit
d98d6e0e1c
2 changed files with 4 additions and 2 deletions
|
|
@ -2623,7 +2623,7 @@
|
|||
"description": "frontends/va: Fix missing unlock",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "af695149e96bf276b52ff3715076ddc847c6b959"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -877,8 +877,10 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
|
|||
|
||||
mtx_lock(&drv->mutex);
|
||||
surf = handle_table_get(drv->htab, output_id);
|
||||
if (!surf || !surf->buffer)
|
||||
if (!surf || !surf->buffer) {
|
||||
mtx_unlock(&drv->mutex);
|
||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||
}
|
||||
|
||||
if (apply_av1_fg) {
|
||||
surf->ctx = context_id;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue