summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-27 11:52:43 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-27 11:52:43 +0200
commit8a1f5a72db12fe4b48ea50e3700dc626c58332f6 (patch)
treec99d99b8e464019e7d6ef09b0271b6c6fd6ecd6b
parent48c72f1f5c8f07cd6c7cb3558e9249f20aefb108 (diff)
scu_gen_encode_and_send(): Fix NULL pointer deref
We were using the 'xua' pointer before checkin if it actually is valid Change-Id: I5cd3250afc0b787b78683cd8ab6b2512e0d5c69e Fixes: coverity CID#166945
-rw-r--r--src/sccp_scoc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 3a52ca6..0eda7ad 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -657,8 +657,8 @@ static void scu_gen_encode_and_send(struct sccp_connection *conn, uint32_t event
uconp->calling_addr = conn->calling_addr;
uconp->sccp_class = conn->sccp_class;
uconp->importance = conn->importance;
- data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA);
if (xua) {
+ data_ie = xua_msg_find_tag(xua, SUA_IEI_DATA);
if (data_ie) {
struct msgb *upmsg = scu_prim->oph.msg;
upmsg->l2h = msgb_put(upmsg, data_ie->len);