From: Lennart Poettering Date: Tue, 30 May 2017 12:49:35 +0000 (+0200) Subject: timesyncd: properly handle OOM errors when parsing fallback servers (#6047) X-Git-Tag: v234~158 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4c069121cbd5f882ef2e7effba5cdd3673c0a1f;p=platform%2Fupstream%2Fsystemd.git timesyncd: properly handle OOM errors when parsing fallback servers (#6047) --- diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index 052329f..ff90f04 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -132,7 +132,11 @@ int main(int argc, char *argv[]) { if (r < 0) log_warning_errno(r, "Failed to parse configuration file: %m"); - assert_se(manager_parse_fallback_string(m, NTP_SERVERS) >= 0); + r = manager_parse_fallback_string(m, NTP_SERVERS); + if (r < 0) { + log_error_errno(r, "Failed to parse fallback server strings: %m"); + goto finish; + } log_debug("systemd-timesyncd running as pid " PID_FMT, getpid()); sd_notify(false,