aboutsummaryrefslogtreecommitdiff
path: root/swaylock/main.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-02 09:06:02 +0100
committerGitHub <noreply@github.com>2018-07-02 09:06:02 +0100
commitdefb73596fedec846280b9155bb3e9d210da49bb (patch)
tree0a3e6c9e5efaf0e8bb5f01ab7691350cd063ebcb /swaylock/main.c
parent649e084f41295be761c0e9137831281b220dd970 (diff)
parent2725185aeba3ae5dd4ab129158cb4677a8a63042 (diff)
Merge pull request #2186 from martinetd/static-analysis
Static analysis fixes
Diffstat (limited to 'swaylock/main.c')
-rw-r--r--swaylock/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 591df7b4..f31ed679 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -42,6 +42,7 @@ static void daemonize() {
int devnull = open("/dev/null", O_RDWR);
dup2(STDOUT_FILENO, devnull);
dup2(STDERR_FILENO, devnull);
+ close(devnull);
uint8_t success = 0;
if (chdir("/") != 0) {
write(fds[1], &success, 1);