sgsn: Fix access to subscr in sgsn_auth_update (Coverity)
Currently the access to subscr->sgsn_data->error_cause is not protected against subscr == NULL like it is done in other code paths of sgsn_auth_update. This commit adds a conditional to avoid a NULL-dereference. Fixes: Coverity CID 1264589 Sponsored-by: On-Waves ehf
This commit is contained in:
parent
6be9ffa3b8
commit
2585620857
|
@ -257,7 +257,7 @@ void sgsn_auth_update(struct sgsn_mm_ctx *mmctx)
|
|||
gsm0408_gprs_access_granted(mmctx);
|
||||
break;
|
||||
case SGSN_AUTH_REJECTED:
|
||||
gmm_cause = subscr->sgsn_data->error_cause;
|
||||
gmm_cause = subscr ? subscr->sgsn_data->error_cause : 0;
|
||||
|
||||
if (subscr && (subscr->flags & GPRS_SUBSCRIBER_CANCELLED) != 0)
|
||||
gsm0408_gprs_access_cancelled(mmctx, gmm_cause);
|
||||
|
|
Loading…
Reference in New Issue