aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gprs/gprs_gmm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 147e0017b..8441f6b68 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -1372,6 +1372,10 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
ctx = sgsn_mm_ctx_alloc_iu(msg->dst);
else
ctx = sgsn_mm_ctx_alloc_gb(msgb_tlli(msg), &ra_id);
+ if (!ctx) {
+ reject_cause = GMM_CAUSE_NET_FAIL;
+ goto rejected;
+ }
ctx->p_tmsi = tmsi;
}
if (ctx->ran_type == MM_CTX_T_GERAN_Gb) {