core/load-fragment: empty assignment to PIDFile= resets the value

Follow-up for a9353a5c5b.
This commit is contained in:
Yu Watanabe 2019-02-06 17:41:26 +01:00
parent e327272d79
commit b8055c05e2
1 changed files with 6 additions and 0 deletions

View File

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