aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-11-24 11:45:13 +0100
committerOliver Smith <osmith@sysmocom.de>2021-11-24 14:38:10 +0100
commit80afda444e15871adc809f87c73aa242c1635ad5 (patch)
treefadf6f2dc6ad1a57ffbb3da9cc0653f2ca3cfbdd
parent72bbdfcd3505dcb6933ea13bab88d422fed4e6e7 (diff)
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
-rw-r--r--src/osmo-bsc/bsc_subscr_conn_fsm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index c18079f34..2140c9ba9 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -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;