From: Eric Engestrom Date: Mon, 5 Nov 2018 09:57:09 +0000 (+0000) Subject: wsi/wayland: only finish() a successfully init()ed display X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d515ded4d951b830b560c352d64918a89027bee5;p=mesa.git wsi/wayland: only finish() a successfully init()ed display Fixes: 43691024982b3ea734ad0 "vulkan/wsi/wayland: Stop caching Wayland displays" Signed-off-by: Eric Engestrom Reviewed-by: Dave Airlie Reviewed-by: Philipp Zabel --- diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 12014b0c143..3d3a60167bf 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; }