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 16:27:24 UTC 2021


osmith has submitted this change. ( 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.

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

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved



diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index c18079f..2140c9b 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -521,6 +521,11 @@
 	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;
 

-- 
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: 3
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211124/8f2ccdab/attachment.htm>


More information about the gerrit-log mailing list