buffer: Cleanup dmabuf params after use

pixman-rendering
Andri Yngvason 2020-07-07 10:03:51 +00:00
parent 8a10ffb33f
commit cc0c6246d2
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,8 @@ static struct wv_buffer* wv_buffer_create_dmabuf(int width, int height,
mod >> 32, mod & 0xffffffff);
self->wl_buffer = zwp_linux_buffer_params_v1_create_immed(params, width,
height, fourcc, /* flags */ 0);
close(fd); // TODO: Maybe keep this open?
zwp_linux_buffer_params_v1_destroy(params);
close(fd);
if (!self->wl_buffer)
goto buffer_failure;
@ -130,6 +131,7 @@ static struct wv_buffer* wv_buffer_create_dmabuf(int width, int height,
buffer_failure:
fd_failure:
zwp_linux_buffer_params_v1_destroy(params);
params_failure:
gbm_bo_destroy(self->bo);
bo_failure: