[Mesa-dev] [PATCH mesa 2/2] wsi/wayland: only finish() a successfully init()ed display

Dave Airlie airlied at gmail.com
Mon Nov 5 10:08:59 UTC 2018


Reviewed-by: Dave Airlie <airlied at redhat.com>
On Mon, 5 Nov 2018 at 20:00, Eric Engestrom <eric.engestrom at intel.com> wrote:
>
> Cc: Dave Airlie <airlied at gmail.com>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
>  src/vulkan/wsi/wsi_common_wayland.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
> index a799b427621d72b2927c..5d79d377f12df81b06ba 100644
> --- a/src/vulkan/wsi/wsi_common_wayland.c
> +++ b/src/vulkan/wsi/wsi_common_wayland.c
> @@ -456,7 +456,8 @@ wsi_wl_get_presentation_support(struct wsi_device *wsi_device,
>
>     struct wsi_wl_display display;
>     VkResult ret = wsi_wl_display_init(wsi, &display, wl_display, false);
> -   wsi_wl_display_finish(&display);
> +   if (ret == VK_SUCCESS)
> +      wsi_wl_display_finish(&display);
>
>     return ret == VK_SUCCESS;
>  }
> --
> Cheers,
>   Eric
>


More information about the mesa-dev mailing list