1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03: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:
Andreas Henriksson 2014-09-18 17:52:54 +02:00 committed by Tom Gundersen
parent 56d21cdebc
commit b1604b341b
Notes: Lennart Poettering 2014-10-24 18:30:32 +02:00
Backport: bugfix

View File

@ -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);