mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
wsi/wayland: fix error path
Fixes:1720bbd353("anv/wsi: split image alloc/free out to separate fns.") Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit8bf7717e1f)
This commit is contained in:
parent
554a99ebde
commit
4768b7353f
1 changed files with 4 additions and 0 deletions
|
|
@ -635,11 +635,15 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain,
|
|||
wl_display_roundtrip(chain->display->display);
|
||||
close(fd);
|
||||
|
||||
if (!image->buffer)
|
||||
goto fail_image;
|
||||
|
||||
wl_proxy_set_queue((struct wl_proxy *)image->buffer, chain->queue);
|
||||
wl_buffer_add_listener(image->buffer, &buffer_listener, image);
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail_image:
|
||||
chain->base.image_fns->free_wsi_image(vk_device, pAllocator,
|
||||
image->image, image->memory);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue