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
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,