mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-05-06 06:47:23 -04:00
render/vulkan: free all render pass allocations on failure
Instead of just the struct
This commit is contained in:
parent
53b8352526
commit
39ea626e8f
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
if (cb == NULL) {
|
||||
free(pass);
|
||||
render_pass_destroy(pass);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -1273,7 +1273,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend
|
|||
if (res != VK_SUCCESS) {
|
||||
wlr_vk_error("vkBeginCommandBuffer", res);
|
||||
vulkan_reset_command_buffer(cb);
|
||||
free(pass);
|
||||
render_pass_destroy(pass);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue