render/vulkan: free all render pass allocations on failure

Instead of just the struct
This commit is contained in:
llyyr 2026-04-19 17:42:16 +05:30 committed by Simon Ser
parent 53b8352526
commit 39ea626e8f

View file

@ -1262,7 +1262,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend
struct wlr_vk_command_buffer *cb = vulkan_acquire_command_buffer(renderer); struct wlr_vk_command_buffer *cb = vulkan_acquire_command_buffer(renderer);
if (cb == NULL) { if (cb == NULL) {
free(pass); render_pass_destroy(pass);
return NULL; return NULL;
} }
@ -1273,7 +1273,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend
if (res != VK_SUCCESS) { if (res != VK_SUCCESS) {
wlr_vk_error("vkBeginCommandBuffer", res); wlr_vk_error("vkBeginCommandBuffer", res);
vulkan_reset_command_buffer(cb); vulkan_reset_command_buffer(cb);
free(pass); render_pass_destroy(pass);
return NULL; return NULL;
} }