projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e327272
)
core/load-fragment: empty assignment to PIDFile= resets the value
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 16:41:26 +0000
(17:41 +0100)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 16:58:24 +0000
(17:58 +0100)
Follow-up for
a9353a5c5b512f107955e56a9812724f40b841d3
.
src/core/load-fragment.c
patch
|
blob
|
history
diff --git
a/src/core/load-fragment.c
b/src/core/load-fragment.c
index
159e8d5
..
44f00a3
100644
(file)
--- 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);