mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-20 06:52:44 +00:00
journal-remote: check return code of sd_event_default
Handle sd_event_default returning error and bail out properly as done in every other caller of this function. Found by coverity. Fixes: CID#1238957
This commit is contained in:
committed by
Tom Gundersen
parent
56d21cdebc
commit
b1604b341b
@@ -808,7 +808,11 @@ static int remoteserver_init(RemoteServer *s,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
sd_event_default(&s->events);
|
||||
r = sd_event_default(&s->events);
|
||||
if (r < 0) {
|
||||
log_error("Failed to allocate event loop: %s", strerror(-r));
|
||||
return r;
|
||||
}
|
||||
|
||||
setup_signals(s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user