smpp: Do not check conn for being null
We are deferencing conn earlier in this function without doing
a null check. At the time deliver_to_esme is called the conn
will always exist and even the lchan is likely to be present.
Remove the null check for conn right now.
Fixes: Coverity CID 1210594
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c
index 6861317..ff5ab40 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -530,7 +530,7 @@
memcpy(deliver.short_message, sms->user_data, deliver.sm_length);
}
- if (esme->acl && esme->acl->osmocom_ext && conn && conn->lchan)
+ if (esme->acl && esme->acl->osmocom_ext && conn->lchan)
append_osmo_tlvs(&deliver.tlv, conn->lchan);
return smpp_tx_deliver(esme, &deliver);