mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-05 13:28:16 +00:00
c/util: Fix double free when failing to initialize Vulkan swapchain
This commit is contained in:
parent
74d38cbb9d
commit
20ac197a6f
|
@ -532,7 +532,6 @@ comp_swapchain_create_init(struct comp_swapchain *sc,
|
|||
if (ret != VK_SUCCESS) {
|
||||
VK_ERROR(vk, "Failed to get native handles for images.");
|
||||
vk_ic_destroy(vk, &sc->vkic);
|
||||
free(sc);
|
||||
return XRT_ERROR_VULKAN;
|
||||
}
|
||||
for (uint32_t i = 0; i < sc->vkic.image_count; i++) {
|
||||
|
@ -544,7 +543,6 @@ comp_swapchain_create_init(struct comp_swapchain *sc,
|
|||
xrt_result_t res = do_post_create_vulkan_setup(vk, info, sc);
|
||||
if (res != XRT_SUCCESS) {
|
||||
vk_ic_destroy(vk, &sc->vkic);
|
||||
free(sc);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue