summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-13 08:52:58 +0200
committerGitHub <noreply@github.com>2018-06-13 08:52:58 +0200
commitb961fbd4ee52343e91f92b83f67122019f3e186c (patch)
treee113abf605ccabd6c71f3915d9da03ac1938464e /src/shared
parent6f534ceb95dfd8a00065b7602df23be50b0cc734 (diff)
parentba0c011eee19dcb2c7c912f5b5c963159ef667f3 (diff)
downloadsystemd-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.c8
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(