mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Check return value from uev_io_init() at runtime
Possible resource leak due to unchecked return value from uev_io_init() found by Coverity Scan. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e53acd1cdd
commit
662f364d09
3 files changed
+11
-3
No files matched your search
@@ -211,7 +211,8 @@ static void init_plugins(uev_ctx_t *ctx)
|
||||
PLUGIN_ITERATOR(p, tmp) {
|
||||
if (is_io_plugin(p)) {
|
||||
_d("Initializing plugin %s for I/O", basename(p->name));
|
||||
uev_io_init(ctx, &p->watcher, generic_io_cb, p, p->io.fd, p->io.flags);
|
||||
if (uev_io_init(ctx, &p->watcher, generic_io_cb, p, p->io.fd, p->io.flags))
|
||||
_e("Failed setting up I/O plugin %s", basename(p->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user