Change in ...osmo-sgsn[master]: sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_cause

laforge gerrit-no-reply at lists.osmocom.org
Thu Jul 18 09:08:19 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/14826 )

Change subject: sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_cause
......................................................................

sgsn_mm_ctx_find_ggsn_ctx(): fix: always set gsm_cause

GCC 9 complains that variable 'gsm_cause' in do_act_pdp_req() may
be uninitialized. This may happen if sgsn_mm_ctx_find_ggsn_ctx()
would return NULL due to no static GGSN configured.

Change-Id: I09c608045dd35b9898b82e236a306ab9a6c2c0b9
---
M src/gprs/gprs_sgsn.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index fae09ae..9a5de41 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -920,7 +920,8 @@
 		LOGMMCTXP(LOGL_NOTICE, mmctx,
 			"No static GGSN configured. Selected APN '%s'\n",
 			selected_apn_str);
-			return NULL;
+		*gsm_cause = GSM_CAUSE_MISSING_APN;
+		return NULL;
 	}
 
 	LOGMMCTXP(LOGL_INFO, mmctx,

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I09c608045dd35b9898b82e236a306ab9a6c2c0b9
Gerrit-Change-Number: 14826
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190718/02c24fb1/attachment.html>


More information about the gerrit-log mailing list