diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-09-14 16:49:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-14 16:49:09 +0200 |
commit | 60c776fd756384b62d3c0ec8b1d000a898767347 (patch) | |
tree | 8241b4d4409922a81e8239b9443c91ffcfa8ef5e /src/shared/conf-parser.c | |
parent | dbbf424c8b77c1649e822c20c0b1fee1d2cfd93d (diff) | |
parent | 0fe50629750238b52b8b78184dbb0e7623a4d18e (diff) | |
download | systemd-60c776fd756384b62d3c0ec8b1d000a898767347.tar.gz |
Merge pull request #6746 from yuwata/parse-empty-string
allow to input empty string to config_parse_xxx()
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r-- | src/shared/conf-parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 8b01b3bf73..96618fbb92 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -725,6 +725,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; @@ -743,6 +748,7 @@ int config_parse_path( path_kill_slashes(n); +finalize: free(*s); *s = n; |