diff options
author | Eric Engestrom <eric@engestrom.ch> | 2016-05-02 15:49:33 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2016-05-31 00:40:15 +0100 |
commit | 9d7d73df7f7888a3ea8420662fa5aa2ef6e3bd82 (patch) | |
tree | 1b406784a609d89d9a8c62b03d53bacb9408e739 | |
parent | Update configuration info in readme (diff) | |
download | sway-9d7d73df7f7888a3ea8420662fa5aa2ef6e3bd82.tar.gz sway-9d7d73df7f7888a3ea8420662fa5aa2ef6e3bd82.tar.zst sway-9d7d73df7f7888a3ea8420662fa5aa2ef6e3bd82.zip |
sway: fix IPC resource leak
-rw-r--r-- | sway/ipc-server.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index a9325a81..05041ec1 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -138,6 +138,7 @@ int ipc_handle_connection(int fd, uint32_t mask, void *data) { | |||
138 | int flags; | 138 | int flags; |
139 | if ((flags=fcntl(client_fd, F_GETFD)) == -1 || fcntl(client_fd, F_SETFD, flags|FD_CLOEXEC) == -1) { | 139 | if ((flags=fcntl(client_fd, F_GETFD)) == -1 || fcntl(client_fd, F_SETFD, flags|FD_CLOEXEC) == -1) { |
140 | sway_log_errno(L_INFO, "Unable to set CLOEXEC on IPC client socket"); | 140 | sway_log_errno(L_INFO, "Unable to set CLOEXEC on IPC client socket"); |
141 | close(client_fd); | ||
141 | return 0; | 142 | return 0; |
142 | } | 143 | } |
143 | 144 | ||