From 9a9c7c8be622c3541474d1dcb6494db40805e8f5 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Tue, 7 Jul 2020 10:03:51 +0000 Subject: [PATCH] buffer: Cleanup dmabuf params after use --- src/buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index e29c3a4..57caa39 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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: