summaryrefslogtreecommitdiffstats
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-02-06 17:41:26 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-02-06 17:58:24 +0100
commitb8055c05e256ccd35ce115864725bfee73b22731 (patch)
tree617356b6d840436aef8e77f983c72da7e8f95649 /src/core/load-fragment.c
parenttest-network: ignore tunnel devices automatically added by kernel (diff)
downloadsystemd-b8055c05e256ccd35ce115864725bfee73b22731.tar.xz
systemd-b8055c05e256ccd35ce115864725bfee73b22731.zip
core/load-fragment: empty assignment to PIDFile= resets the value
Follow-up for a9353a5c5b512f107955e56a9812724f40b841d3.
Diffstat (limited to '')
-rw-r--r--src/core/load-fragment.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 159e8d5050..44f00a3046 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -4254,6 +4254,12 @@ int config_parse_pid_file(
assert(rvalue);
assert(u);
+ if (isempty(rvalue)) {
+ /* An empty assignment removes already set value. */
+ *s = mfree(*s);
+ return 0;
+ }
+
r = unit_full_printf(u, rvalue, &k);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in '%s', ignoring: %m", rvalue);