diff options
author | Eric Engestrom <[email protected]> | 2018-02-26 13:34:54 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-03-09 13:25:44 +0000 |
commit | e903a7b0bbcadc8911e1b32addd6186acd548809 (patch) | |
tree | eb3f210aadf107c416e9a5a10dae500f68b00ac1 /src/vulkan/wsi | |
parent | a793e7899f17b10aa7b7fe533390eaa5ed732e4d (diff) |
vulkan/wsi: clean up cleanup path
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Keith Packard <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index edba13a13de..fe262b4968d 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -82,20 +82,20 @@ wsi_device_init(struct wsi_device *wsi, #ifdef VK_USE_PLATFORM_XCB_KHR result = wsi_x11_init_wsi(wsi, alloc); if (result != VK_SUCCESS) - return result; + goto fail; #endif #ifdef VK_USE_PLATFORM_WAYLAND_KHR result = wsi_wl_init_wsi(wsi, alloc, pdevice); - if (result != VK_SUCCESS) { -#ifdef VK_USE_PLATFORM_XCB_KHR - wsi_x11_finish_wsi(wsi, alloc); -#endif - return result; - } + if (result != VK_SUCCESS) + goto fail; #endif return VK_SUCCESS; + +fail: + wsi_device_finish(wsi, alloc); + return result; } void |