Neels Hofmeyr has submitted this change and it was merged.

Change subject: smpp_smsc.c: don't talloc_strdup NULL pointers
......................................................................


smpp_smsc.c: don't talloc_strdup NULL pointers

Change-Id: Ie6a83a20464a959cf51f999d6f900fa4516ced1b
---
M src/libmsc/smpp_smsc.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c
index 34b93f8..f9fef8b 100644
--- a/src/libmsc/smpp_smsc.c
+++ b/src/libmsc/smpp_smsc.c
@@ -974,7 +974,7 @@
        talloc_free((void*)smsc->bind_addr);
        smsc->bind_addr = NULL;
        if (bind_addr) {
-               smsc->bind_addr = talloc_strdup(smsc, bind_addr);
+               smsc->bind_addr = bind_addr ? talloc_strdup(smsc, bind_addr) : 
NULL;
                if (!smsc->bind_addr)
                        return -ENOMEM;
        }

-- 
To view, visit https://gerrit.osmocom.org/5663
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6a83a20464a959cf51f999d6f900fa4516ced1b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>

Reply via email to