render/vulkan: destroy image view on allocation failure

This commit is contained in:
llyyr 2026-04-19 17:49:30 +05:30 committed by Simon Ser
parent b808144b7b
commit 70d99eefef

View file

@ -330,6 +330,7 @@ struct wlr_vk_texture_view *vulkan_texture_get_or_create_view(struct wlr_vk_text
view->ds_pool = vulkan_alloc_texture_ds(texture->renderer, pipeline_layout->ds, &view->ds);
if (!view->ds_pool) {
vkDestroyImageView(dev, view->image_view, NULL);
free(view);
wlr_log(WLR_ERROR, "failed to allocate descriptor");
return NULL;