diff options
author | the 34c3 gsm team <34c3-gsm@congress> | 2017-12-28 15:38:05 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-01-07 19:04:10 +0100 |
commit | cfab83e642eef4a0ff6020db0defa410180aba43 (patch) | |
tree | 7cfd805e1c97c9b9002f8ce94f2b5861fdf78d90 | |
parent | dcc193d3a6f2325af74b609f6a28c1ad04588a6a (diff) |
smpp_smsc.c: don't talloc_strdup NULL pointers
Change-Id: Ie6a83a20464a959cf51f999d6f900fa4516ced1b
-rw-r--r-- | src/libmsc/smpp_smsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmsc/smpp_smsc.c b/src/libmsc/smpp_smsc.c index 34b93f88f..f9fef8bc2 100644 --- a/src/libmsc/smpp_smsc.c +++ b/src/libmsc/smpp_smsc.c @@ -974,7 +974,7 @@ int smpp_smsc_conf(struct smsc *smsc, const char *bind_addr, uint16_t port) 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; } |