Fix use of unitialized variable in error path

CID 1408478.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-12-04 14:51:33 +01:00
parent 9142bbd19c
commit bddeb54cbb
1 changed files with 1 additions and 2 deletions

View File

@ -1340,9 +1340,8 @@ int safe_fork_full(
}
} else if (flags & FORK_STDOUT_TO_STDERR) {
if (dup2(STDERR_FILENO, STDOUT_FILENO) < 0) {
log_full_errno(prio, r, "Failed to connect stdout to stderr: %m");
log_full_errno(prio, errno, "Failed to connect stdout to stderr: %m");
_exit(EXIT_FAILURE);
}
}