diff mbox

[3/4] bsc_nat: forward_sccp_to_msc(): assert con presence (CID #57872)

Message ID 1460640093-22167-4-git-send-email-nhofmeyr@sysmocom.de
State Not Applicable
Headers show

Commit Message

Neels Hofmeyr April 14, 2016, 1:21 p.m. UTC
---
 openbsc/src/osmo-bsc_nat/bsc_nat.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index cacb919..b065769 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1152,6 +1152,7 @@  static int forward_sccp_to_msc(struct bsc_connection *bsc, struct msgb *msg)
 			if (!create_sccp_src_ref(bsc, parsed))
 				goto exit2;
 			con = patch_sccp_src_ref_to_msc(msg, parsed, bsc);
+			OSMO_ASSERT(con);
 			con->msc_con = bsc->nat->msc_con;
 			con_msc = con->msc_con;
 			con->filter_state.con_type = con_type;