mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 21:20:12 +01:00
vulkan: don't free uninitialised memory
The modifiers array hasn't been initialised by then, much less with data that would need freeing. Move the label after the loop to fix this. Fixes:c80c08e226("vulkan/wsi/x11: Add support for DRI3 v1.2") Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (cherry picked from commite4fe2fd3bb)
This commit is contained in:
parent
b6167e9640
commit
df303adc29
1 changed files with 1 additions and 1 deletions
|
|
@ -1421,10 +1421,10 @@ fail_init_images:
|
|||
for (uint32_t j = 0; j < image; j++)
|
||||
x11_image_finish(chain, pAllocator, &chain->images[j]);
|
||||
|
||||
fail_register:
|
||||
for (int i = 0; i < ARRAY_SIZE(modifiers); i++)
|
||||
vk_free(pAllocator, modifiers[i]);
|
||||
|
||||
fail_register:
|
||||
xcb_unregister_for_special_event(chain->conn, chain->special_event);
|
||||
|
||||
wsi_swapchain_finish(&chain->base);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue