laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33332 )
Change subject: stream: Assert that fd is valid in stream_cli_handle_connecting() ......................................................................
stream: Assert that fd is valid in stream_cli_handle_connecting()
This function should never be called if we don't have a valid fd.
Change-Id: If0bed2bae556e0a8233e9e66e82c70a5c677fc3c Fixes: Coverity CID#321045 --- M src/stream.c 1 file changed, 13 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, approved
diff --git a/src/stream.c b/src/stream.c index 2ba4cde..31aa058 100644 --- a/src/stream.c +++ b/src/stream.c @@ -480,6 +480,7 @@ socklen_t len = sizeof(error);
int fd = osmo_stream_cli_fd(cli); + OSMO_ASSERT(fd >= 0);
if (ret < 0) { osmo_stream_cli_reconnect(cli);