mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
Check return value from iwatch_init(), found by Coverity
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
929a6e7aac
commit
c39106906d
1 file changed
+3
@@ -511,6 +511,9 @@ void cgroup_init(uev_ctx_t *ctx)
|
|||||||
|
|
||||||
/* prepare cgroup.events watcher */
|
/* prepare cgroup.events watcher */
|
||||||
fd = iwatch_init(&iw_cgroup);
|
fd = iwatch_init(&iw_cgroup);
|
||||||
|
if (fd == -1)
|
||||||
|
goto abort;
|
||||||
|
|
||||||
if (uev_io_init(ctx, &cgw, cgroup_events_cb, NULL, fd, UEV_READ)) {
|
if (uev_io_init(ctx, &cgw, cgroup_events_cb, NULL, fd, UEV_READ)) {
|
||||||
_pe("Failed setting up cgroup.events watcher");
|
_pe("Failed setting up cgroup.events watcher");
|
||||||
iwatch_exit(&iw_cgroup);
|
iwatch_exit(&iw_cgroup);
|
||||||
|
|||||||
Reference in new issue
Block a user