diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-07-05 17:20:18 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-07-05 17:21:42 +0200 |
commit | cf65c9b297206261e110fa859f83d434e884d238 (patch) | |
tree | 51df0762be979bef1d7b1a02589f2051f45d785d | |
parent | 60bcba3bcf69893086d7c6c7389f3c82e342ca5f (diff) |
assignment_fsm: Add assert to guard ptr access
Let's make sure the null pointer is caught by the assert if ever code
ends up here with conn->lchan being NULL.
Change-Id: I404df638da6a93caa535f10fd330ea24a775bfc3
-rw-r--r-- | src/osmo-bsc/assignment_fsm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 928d3b2bd..2c52d22d8 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -575,6 +575,7 @@ void assignment_fsm_start(struct gsm_subscriber_connection *conn, struct gsm_bts matching_mode = true; } if (!matching_mode) { + OSMO_ASSERT(conn->lchan); assignment_fail(GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE, "Assignment of lchan %s to %s type %s requested, but lchan is not compatible", gsm_lchan_name(conn->lchan), |