diff options
author | Eric Engestrom <[email protected]> | 2018-09-13 20:36:15 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-09-24 17:37:43 +0100 |
commit | bde3102c0dc3e33d2605d013205e381ff6d93ace (patch) | |
tree | df5baa7a9b2a1dd88868de8ce915205d8ca41b1d /src | |
parent | 3e7b5e5db2f332e258d01c855137476e8fd4a44f (diff) |
vulkan/wsi/display: check if wsi_swapchain_init() succeeded
Fixes: da997ebec929421939553 "vulkan: Add KHR_display extension using DRM [v10]"
Cc: Keith Packard <[email protected]>
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/wsi/wsi_common_display.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index e99b0465ec9..3bf166977ea 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; |