diff options
author | emersion <contact@emersion.fr> | 2018-06-16 19:01:13 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-06-16 19:01:13 +0100 |
commit | 225aa815b00502c2d91897c1ac2c4c5c65f82ca5 (patch) | |
tree | e37d58ba6951c05617567b4b8784c9cc6d38660d | |
parent | da114d501322fe2f1698d19a11d6dc298000dfe4 (diff) |
buffer: fix wlr_texture leak on failed alloc
-rw-r--r-- | types/wlr_buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/types/wlr_buffer.c b/types/wlr_buffer.c index ccff7b46..673d7088 100644 --- a/types/wlr_buffer.c +++ b/types/wlr_buffer.c @@ -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; |