Change in osmo-bsc[master]: bsc_subscr_conn_fsm: fix crash if !conn

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Nov 24 10:52:32 UTC 2021


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


Change subject: bsc_subscr_conn_fsm: fix crash if !conn
......................................................................

bsc_subscr_conn_fsm: fix crash if !conn

Do not crash in gscon_ensure_mgw_endpoint() if conn is NULL. Such checks
are also in gscon_is_sccplite() and gscon_is_aoip() already, so it will
end up in the return NULL codepath.

Related: SYS#5728
Change-Id: Id579243cc9ebbe8f315cd11754166970329dc9cf
---
M src/osmo-bsc/bsc_subscr_conn_fsm.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index c18079f..f549ee1 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -521,7 +521,7 @@
 	const char *epname;
 	struct mgcp_client *mgcp_client = NULL;
 
-	if (conn->user_plane.mgw_endpoint)
+	if (conn && conn->user_plane.mgw_endpoint)
 		return conn->user_plane.mgw_endpoint;
 
 	if (gscon_is_sccplite(conn) || gscon_is_aoip(conn)) {

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id579243cc9ebbe8f315cd11754166970329dc9cf
Gerrit-Change-Number: 26350
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211124/1cc18b28/attachment.htm>


More information about the gerrit-log mailing list