diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2023-06-16 09:48:33 +0200 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2023-06-16 11:24:22 +0200 |
commit | 39f99fa3cea8e8c8772d07f037804d3fdc2f2df5 (patch) | |
tree | 356472f6a1fac38957c9a58980636b276c9b762a | |
parent | 8cd2c4455e3210707a6b7a67fc06347dba2a3156 (diff) |
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
-rw-r--r-- | src/stream.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 @@ static void stream_cli_handle_connecting(struct osmo_stream_cli *cli, int res) socklen_t len = sizeof(error); int fd = osmo_stream_cli_fd(cli); + OSMO_ASSERT(fd >= 0); if (ret < 0) { osmo_stream_cli_reconnect(cli); |