diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-04 14:51:33 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-05 10:31:34 +0100 |
commit | bddeb54cbb09fb66b2156263086c41bb5c76f583 (patch) | |
tree | 54d652fbd76b77f63e730af29e11d32cdb273ddb /src/basic/process-util.c | |
parent | Merge pull request #14209 from poettering/sd-bus-sensitive (diff) | |
download | systemd-bddeb54cbb09fb66b2156263086c41bb5c76f583.tar.xz systemd-bddeb54cbb09fb66b2156263086c41bb5c76f583.zip |
Fix use of unitialized variable in error path
CID 1408478.
Diffstat (limited to '')
-rw-r--r-- | src/basic/process-util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index d60d8275ca..743c7b1dad 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -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); } } |