aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-22 08:48:57 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-22 08:48:57 +0200
commit37fb26c34d860a2c2d62d729a7dc9e37666b6509 (patch)
tree217e93d9ba883016b97f097728efe77aa916de70
parent78ab2f4a5b195eea00255b68a28dd0939410c3ff (diff)
iu_client: try to fix itcccamp2019
-rw-r--r--src/iu_client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/iu_client.c b/src/iu_client.c
index d8351c7..ece1de2 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -820,6 +820,11 @@ static int sccp_sap_up(struct osmo_prim_hdr *oph, void *_scu)
if (msgb_l2len(oph->msg))
rc = ranap_cn_rx_co(cn_ranap_handle_co, ue, msgb_l2(oph->msg), msgb_l2len(oph->msg));
+ /* A Iu Release event might be used to free the UE in cn_ranap_handle_co. */
+ ue = ue_conn_ctx_find(prim->u.disconnect.conn_id);
+ if (!ue)
+ break;
+
ue->conn_state = RANAP_CONN_STATE_DISCONNECTED;
global_iu_event_cb(ue, RANAP_IU_EVENT_LINK_INVALIDATED, NULL);
break;