mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-27 11:59:50 +01:00
buffer: fix wlr_texture leak on failed alloc
This commit is contained in:
parent
da114d5013
commit
225aa815b0
1 changed files with 1 additions and 0 deletions
|
@ -97,6 +97,7 @@ struct wlr_buffer *wlr_buffer_create(struct wlr_renderer *renderer,
|
|||
|
||||
struct wlr_buffer *buffer = calloc(1, sizeof(struct wlr_buffer));
|
||||
if (buffer == NULL) {
|
||||
wlr_texture_destroy(texture);
|
||||
return NULL;
|
||||
}
|
||||
buffer->resource = resource;
|
||||
|
|
Loading…
Reference in a new issue