forked from acouzens/open5gs
[MME] Follow-up on #2916
When there is no MME-UE Context, going to cleanup without setting s6a_message could cause a segmentation fault. We fixed the problem by moving the location of setting s6a_message to before cleanup.
This commit is contained in:
parent
290df460ef
commit
94bd68aa7b
|
@ -516,6 +516,9 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
|
|||
break;
|
||||
|
||||
case MME_EVENT_S6A_MESSAGE:
|
||||
s6a_message = e->s6a_message;
|
||||
ogs_assert(s6a_message);
|
||||
|
||||
/*
|
||||
* A race condition can occur in the following situations.
|
||||
* In conclusion, we can use this situation to determine
|
||||
|
@ -563,9 +566,6 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
s6a_message = e->s6a_message;
|
||||
ogs_assert(s6a_message);
|
||||
|
||||
switch (s6a_message->cmd_code) {
|
||||
case OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION:
|
||||
ogs_debug("OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION");
|
||||
|
|
Loading…
Reference in New Issue