osmo_io: do check_mode_callback_compat() only if ioops is set at osmo_iofd_setup()
Setting ioops is optional when calling osmo_iofd_setup(). If it is not
set, do not call check_mode_callback_compat() to check for
compatibility.
Closes: Coverity CID#349578
Change-Id: I1e25f3e420f25a44cbf73a4da9a498b7561e9ddd
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 33466e5..5a5e05c 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -619,7 +619,7 @@
return NULL;
}
- if (!check_mode_callback_compat(mode, ioops))
+ if (ioops && !check_mode_callback_compat(mode, ioops))
return NULL;
iofd = talloc_zero(ctx, struct osmo_io_fd);