Fix minor descriptor leak, found by Coverity Scan
It is safe to always close() the fd here. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -2036,8 +2036,7 @@ static int waitdaemon(int maxwait)
|
|||||||
(void)dup2(fd, STDIN_FILENO);
|
(void)dup2(fd, STDIN_FILENO);
|
||||||
(void)dup2(fd, STDOUT_FILENO);
|
(void)dup2(fd, STDOUT_FILENO);
|
||||||
(void)dup2(fd, STDERR_FILENO);
|
(void)dup2(fd, STDERR_FILENO);
|
||||||
if (fd > STDERR_FILENO)
|
(void)close(fd);
|
||||||
(void)close(fd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return getppid();
|
return getppid();
|
||||||
|
Reference in New Issue
Block a user