mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
direct session backend: fix closing -1 on error
Found through static analysis
This commit is contained in:
parent
1e17f4deb6
commit
266898ca1f
1 changed files with 3 additions and 1 deletions
|
@ -159,7 +159,9 @@ static void communicate(int sock) {
|
|||
}
|
||||
error:
|
||||
send_msg(sock, ret ? -1 : fd, &ret, sizeof(ret));
|
||||
close(fd);
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue