mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-25 09:20:10 +01:00
fix Use after free
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
This commit is contained in:
parent
b1621015c7
commit
5f1733d88b
1 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, 2019, 2021-2022 Arm Limited.
|
||||
* Copyright (c) 2017, 2019, 2021-2023 Arm Limited.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
|
@ -82,10 +82,10 @@ wsi_layer_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapc,
|
|||
}
|
||||
|
||||
assert(swapc != VK_NULL_HANDLE);
|
||||
device_data.remove_layer_swapchain(swapc);
|
||||
|
||||
auto *sc = reinterpret_cast<wsi::swapchain_base *>(swapc);
|
||||
wsi::destroy_surface_swapchain(sc, device_data, pAllocator);
|
||||
|
||||
device_data.remove_layer_swapchain(swapc);
|
||||
}
|
||||
|
||||
VWL_VKAPI_CALL(VkResult)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue