aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-06-06 00:50:41 -0400
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-06-06 00:50:41 -0400
commitbd7b42eb9f182b3eef62a59c9da0ed9f2660440a (patch)
treecdfc5b7994fb05b0ffa5e5050d26926e3b6db3c9 /render
parent99f63b03e7970093cf4b8028b21b26b656e14e6f (diff)
dmabuf: Don't leak file descriptors on error path
Diffstat (limited to 'render')
-rw-r--r--render/dmabuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/dmabuf.c b/render/dmabuf.c
index 3c431159..433cb82e 100644
--- a/render/dmabuf.c
+++ b/render/dmabuf.c
@@ -29,7 +29,7 @@ bool wlr_dmabuf_attributes_copy(struct wlr_dmabuf_attributes *dst,
error:
for (int j = 0; j < i; j++) {
- close(dst->fd[i]);
+ close(dst->fd[j]);
dst->fd[j] = -1;
}
dst->n_planes = 0;