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

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Apr 14 13:21:32 UTC 2016


---
 openbsc/src/osmo-bsc_nat/bsc_nat.c | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.1.4




More information about the OpenBSC mailing list