chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9407b5f
)
shared: allow to input empty string to config_parse_path()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 5 Sep 2017 06:12:55 +0000
(15:12 +0900)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 5 Sep 2017 06:12:55 +0000
(15:12 +0900)
Fixes #6633.
src/shared/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index 7b3ac8999d50df7de6bf85396a2bc8ee53dd25e4..c8a95c7f30117fe8620fa7cf789766b92b9e7c2b 100644
(file)
--- a/
src/shared/conf-parser.c
+++ b/
src/shared/conf-parser.c
@@
-734,6
+734,11
@@
int config_parse_path(
assert(rvalue);
assert(data);
+ if (isempty(rvalue)) {
+ n = NULL;
+ goto finalize;
+ }
+
if (!utf8_is_valid(rvalue)) {
log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue);
return fatal ? -ENOEXEC : 0;
@@
-752,6
+757,7
@@
int config_parse_path(
path_kill_slashes(n);
+finalize:
free(*s);
*s = n;