Change in osmo-bsc[master]: assignment_fsm: Add assert to guard ptr access

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 5 15:21:19 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24849 )


Change subject: assignment_fsm: Add assert to guard ptr access
......................................................................

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
---
M src/osmo-bsc/assignment_fsm.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/24849/1

diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 928d3b2..2c52d22 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -575,6 +575,7 @@
 			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),

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24849
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I404df638da6a93caa535f10fd330ea24a775bfc3
Gerrit-Change-Number: 24849
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210705/b4e2348f/attachment-0001.htm>


More information about the gerrit-log mailing list