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);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33332
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If0bed2bae556e0a8233e9e66e82c70a5c677fc3c
Gerrit-Change-Number: 33332
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to