Fix segmentation fault when PDUSession Release
The if
below checks if pduSession
is NULL
, but inside the if
there is pduSession->xid = xid;
where we try to set xid
to a NULL
variable.
if (!pduSession) {
LOG_I(NR_RRC, "no pdusession_id, AMF requested to close it id=%d\n", cmd->pdusession_release_params[pdusession].pdusession_id);
int j=UE->nb_of_pdusessions++;
UE->pduSession[j].status = PDU_SESSION_STATUS_FAILED;
UE->pduSession[j].param.pdusession_id = cmd->pdusession_release_params[pdusession].pdusession_id;
UE->pduSession[j].cause = NGAP_CAUSE_RADIO_NETWORK;
UE->pduSession[j].cause_value = 30;
pduSession->xid = xid;
continue;
}
By removing the line, we can set mobile phones (Pixel 7) to airplane mode without getting segmentation fault at the gNB.
Edited by Luis Pereira