[Mesa-dev] [PATCH mesa] vulkan/wsi/display: check if wsi_swapchain_init() succeeded

Jason Ekstrand jason at jlekstrand.net
Thu Sep 13 22:55:31 UTC 2018


On Thu, Sep 13, 2018 at 3:06 PM Eric Engestrom <eric.engestrom at intel.com>
wrote:

> Fixes: da997ebec929421939553 "vulkan: Add KHR_display extension using DRM
> [v10]"
> Cc: Keith Packard <keithp at keithp.com>
> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
>  src/vulkan/wsi/wsi_common_display.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/vulkan/wsi/wsi_common_display.c
> b/src/vulkan/wsi/wsi_common_display.c
> index 1e90bba460cba190c5ab..3147cd5044976a6cbe26 100644
> --- a/src/vulkan/wsi/wsi_common_display.c
> +++ b/src/vulkan/wsi/wsi_common_display.c
> @@ -1712,6 +1712,8 @@ wsi_display_surface_create_swapchain(
>
>     VkResult result = wsi_swapchain_init(wsi_device, &chain->base, device,
>                                          create_info, allocator);
> +   if (result != VK_SUCCESS)
> +      return result;
>

You need to free the swapchain


>     chain->base.destroy = wsi_display_swapchain_destroy;
>     chain->base.get_wsi_image = wsi_display_get_wsi_image;
> --
> Cheers,
>   Eric
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180913/9fed03cc/attachment.html>


More information about the mesa-dev mailing list