summaryrefslogtreecommitdiffstats
path: root/src/basic/process-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-04 14:51:33 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-05 10:31:34 +0100
commitbddeb54cbb09fb66b2156263086c41bb5c76f583 (patch)
tree54d652fbd76b77f63e730af29e11d32cdb273ddb /src/basic/process-util.c
parentMerge pull request #14209 from poettering/sd-bus-sensitive (diff)
downloadsystemd-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.c3
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);
}
}