thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 1 forks source link

Some fixes for memory handling in Vulkan implementation #39

Closed meyraud705 closed 2 weeks ago

meyraud705 commented 2 weeks ago

Description

Always check return value of VULKAN_INTERNAL_QuerySwapchainSupport(), if 1st call to vkGetPhysicalDeviceSurfacePresentModesKHR() fails then outputDetails->formatsLength is not 0 but outputDetails->formats is still not initialised. Always free outputDetails->formats on error in VULKAN_INTERNAL_QuerySwapchainSupport(). Use correct type for allocation of commandBuffer->presentDatas. Do some allocations later to avoid memory leaks on error.

Existing Issue(s)

None