mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-18 15:58:06 +02:00
v3d: fix resource leak in error path
Do not leak pipe resource if scanout resource creation fails. Fixes:bf6973199d("v3d: Allow the UIF modifier with renderonly.") Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643> (cherry picked from commit66bf683ca9)
This commit is contained in:
parent
0c3328ef09
commit
2ef356c0c7
2 changed files with 2 additions and 2 deletions
|
|
@ -166,7 +166,7 @@
|
|||
"description": "v3d: fix resource leak in error path",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "bf6973199d186c93da35becc695db58fd3d1b4e5"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,
|
|||
|
||||
if (!rsc->scanout) {
|
||||
fprintf(stderr, "Failed to create scanout resource\n");
|
||||
return NULL;
|
||||
goto fail;
|
||||
}
|
||||
assert(handle.type == WINSYS_HANDLE_TYPE_FD);
|
||||
rsc->bo = v3d_bo_open_dmabuf(screen, handle.handle);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue