bsc_subscr_conn_fsm: fix crash if !conn

Do not crash in gscon_ensure_mgw_endpoint() if conn is NULL.

Related: SYS#5728
Change-Id: Id579243cc9ebbe8f315cd11754166970329dc9cf
This commit is contained in:
Oliver Smith 2021-11-24 11:45:13 +01:00
parent 72bbdfcd35
commit 80afda444e
1 changed files with 5 additions and 0 deletions

View File

@ -521,6 +521,11 @@ struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct gsm_subscriber_connection
const char *epname;
struct mgcp_client *mgcp_client = NULL;
if (!conn) {
LOG_LCHAN(for_lchan, LOGL_ERROR, "no conn!\n");
return NULL;
}
if (conn->user_plane.mgw_endpoint)
return conn->user_plane.mgw_endpoint;