mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
4f155022d8
commit
25d5bf6570
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue