aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2024-03-01 17:31:27 +0100
committerlaforge <laforge@osmocom.org>2024-03-04 19:05:17 +0000
commit25d5bf65709b0b110d59fb1e594a2cc8b4387c55 (patch)
treea860a04cdd6760f99e526267df42ab0d6db151e8
parent4f155022d8cd64a1a4795b851c49aa2633947740 (diff)
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
-rw-r--r--src/core/osmo_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 33466e5d..5a5e05c7 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -619,7 +619,7 @@ struct osmo_io_fd *osmo_iofd_setup(const void *ctx, int fd, const char *name, en
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);