mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
dmabuf: Don't leak file descriptors on error path
This commit is contained in:
parent
99f63b03e7
commit
bd7b42eb9f
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ bool wlr_dmabuf_attributes_copy(struct wlr_dmabuf_attributes *dst,
|
||||||
|
|
||||||
error:
|
error:
|
||||||
for (int j = 0; j < i; j++) {
|
for (int j = 0; j < i; j++) {
|
||||||
close(dst->fd[i]);
|
close(dst->fd[j]);
|
||||||
dst->fd[j] = -1;
|
dst->fd[j] = -1;
|
||||||
}
|
}
|
||||||
dst->n_planes = 0;
|
dst->n_planes = 0;
|
||||||
|
|
Loading…
Reference in a new issue