diff options
author | Andreas Henriksson <andreas@fatal.se> | 2014-09-18 17:52:54 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-09-18 18:33:44 +0200 |
commit | b1604b341bcd190d67894f416d842990a082a4a4 (patch) | |
tree | 48fd7b2dfec267076b0faf991346d75b348f790b | |
parent | 56d21cdebce3ecd3b06189cb2184a84ba909619f (diff) |
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
-rw-r--r-- | src/journal-remote/journal-remote.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 12de820330..f06c2cb249 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -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); |