Skip to content

Commit b8055c0

Browse files
committed
core/load-fragment: empty assignment to PIDFile= resets the value
Follow-up for a9353a5.
1 parent e327272 commit b8055c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/load-fragment.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4254,6 +4254,12 @@ int config_parse_pid_file(
42544254
assert(rvalue);
42554255
assert(u);
42564256

4257+
if (isempty(rvalue)) {
4258+
/* An empty assignment removes already set value. */
4259+
*s = mfree(*s);
4260+
return 0;
4261+
}
4262+
42574263
r = unit_full_printf(u, rvalue, &k);
42584264
if (r < 0) {
42594265
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve unit specifiers in '%s', ignoring: %m", rvalue);

0 commit comments

Comments
 (0)