1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

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

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);
}
}