Fixes: da997ebec929421939553 "vulkan: Add KHR_display extension using DRM [v10]" Cc: Keith Packard <kei...@keithp.com> Cc: Jason Ekstrand <ja...@jlekstrand.net> Signed-off-by: Eric Engestrom <eric.engest...@intel.com> --- v2: don't forget to free the swapchain too (Jason) --- src/vulkan/wsi/wsi_common_display.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index 1e90bba460cba190c5ab..338fad6be792385db9f4 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -1712,6 +1712,10 @@ wsi_display_surface_create_swapchain( VkResult result = wsi_swapchain_init(wsi_device, &chain->base, device, create_info, allocator); + if (result != VK_SUCCESS) { + vk_free(allocator, chain); + return result; + } chain->base.destroy = wsi_display_swapchain_destroy; chain->base.get_wsi_image = wsi_display_get_wsi_image; -- Cheers, Eric _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev