diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-13 08:52:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 08:52:58 +0200 |
commit | b961fbd4ee52343e91f92b83f67122019f3e186c (patch) | |
tree | e113abf605ccabd6c71f3915d9da03ac1938464e /src/shared | |
parent | 6f534ceb95dfd8a00065b7602df23be50b0cc734 (diff) | |
parent | ba0c011eee19dcb2c7c912f5b5c963159ef667f3 (diff) | |
download | systemd-b961fbd4ee52343e91f92b83f67122019f3e186c.tar.gz |
Merge pull request #9172 from yuwata/timesync-ntp-parser
timesync: check validity of NTP server name or address
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/conf-parser.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 29dd1ddc88..4a41b814ae 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -716,10 +716,8 @@ int config_parse_path( assert(rvalue); assert(data); - if (isempty(rvalue)) { - n = NULL; + if (isempty(rvalue)) goto finalize; - } n = strdup(rvalue); if (!n) @@ -730,9 +728,7 @@ int config_parse_path( return fatal ? -ENOEXEC : 0; finalize: - free_and_replace(*s, n); - - return 0; + return free_and_replace(*s, n); } int config_parse_strv( |