pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/39203?usp=email )


Change subject: mgcp-client: Fix regression checking null ptr
......................................................................

mgcp-client: Fix regression checking null ptr

A recent patch introduced a bug checking incorrectly for null ptr.

Related: Coverity CID#445417
Related: Coverity CID#445418
Fixes: e6ef4e7484a132cce812396c776f7ab2a291cf8e
Change-Id: I1a458a34376851aec73c14a658cccd6132a5eb6c
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/03/39203/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 8a7c1f6..ab8ba9f 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -864,7 +864,7 @@
        };
        osmo_strlcpy(mgcp_msg_dlcx.endpoint, epname, 
sizeof(mgcp_msg_dlcx.endpoint));
        msgb_dlcx = mgcp_msg_gen(mgcp, &mgcp_msg_dlcx);
-       if (msgb_dlcx) {
+       if (!msgb_dlcx) {
                LOGPMGW(mgcp, LOGL_ERROR, "Failed generating MGCP DLCX %s\n", 
epname);
                return;
        }
@@ -881,7 +881,7 @@
        };
        OSMO_STRLCPY_ARRAY(mgcp_msg_auep.endpoint, epname);
        msgb_auep = mgcp_msg_gen(mgcp, &mgcp_msg_auep);
-       if (msgb_auep) {
+       if (!msgb_auep) {
                LOGPMGW(mgcp, LOGL_ERROR, "Failed generating MGCP AUEP %s\n", 
epname);
                return;
        }

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39203?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I1a458a34376851aec73c14a658cccd6132a5eb6c
Gerrit-Change-Number: 39203
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to