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>
This commit is contained in:
committed by
Marge Bot
parent
2af08bf7b6
commit
66bf683ca9
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user