diff options
author | Eric Engestrom <eric@engestrom.ch> | 2016-10-20 00:09:11 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-10-24 08:58:59 +0100 |
commit | 4768b7353ff47eb6d80093b0c6f5e35747365411 (patch) | |
tree | 252735e8b7e93b70589dce5f48c8f97ddc8085ef /src/vulkan | |
parent | 554a99ebdecd6e2fb88e2aa05308e06372886c36 (diff) | |
download | external_mesa3d-4768b7353ff47eb6d80093b0c6f5e35747365411.zip external_mesa3d-4768b7353ff47eb6d80093b0c6f5e35747365411.tar.gz external_mesa3d-4768b7353ff47eb6d80093b0c6f5e35747365411.tar.bz2 |
wsi/wayland: fix error path
Fixes: 1720bbd353d87412754f ("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 commit 8bf7717e1f84d180f42fb665772878d3b6d27459)
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 32a0a51..fc13bde 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -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); |