From 0defdc4af5a0315a28227af3aef20bed2cf2f3f5 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 26 Aug 2024 04:54:54 +0200 Subject: [PATCH] gpu: Plug fd leak in fallback path If we can't construct a dmabuf texture, we need to clear the dmabuf fd. --- gsk/gpu/gskgpudownloadop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gsk/gpu/gskgpudownloadop.c b/gsk/gpu/gskgpudownloadop.c index 67bb28b71d..967fc97a98 100644 --- a/gsk/gpu/gskgpudownloadop.c +++ b/gsk/gpu/gskgpudownloadop.c @@ -325,6 +325,8 @@ gsk_gpu_download_op_gl_command (GskGpuOp *op, if (self->texture) return op->next; + + gdk_dmabuf_close_fds (&texture->dmabuf); } g_free (texture);