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:
parent
56d21cdebc
commit
b1604b341b
Notes:
Lennart Poettering
2014-10-24 18:30:32 +02:00
Backport: bugfix
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user