mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
sway: fix IPC resource leak
This commit is contained in:
parent
ad942708a7
commit
9d7d73df7f
1 changed files with 1 additions and 0 deletions
|
@ -138,6 +138,7 @@ int ipc_handle_connection(int fd, uint32_t mask, void *data) {
|
||||||
int flags;
|
int flags;
|
||||||
if ((flags=fcntl(client_fd, F_GETFD)) == -1 || fcntl(client_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
|
if ((flags=fcntl(client_fd, F_GETFD)) == -1 || fcntl(client_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
|
||||||
sway_log_errno(L_INFO, "Unable to set CLOEXEC on IPC client socket");
|
sway_log_errno(L_INFO, "Unable to set CLOEXEC on IPC client socket");
|
||||||
|
close(client_fd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue