enb,nr: handle nullptr return when allocating PDU

master
Andre Puschmann 3 years ago
parent fc35c0ee51
commit 08215a85ff

@ -207,8 +207,11 @@ bool slot_worker::work_ul()
pusch_info.uci_cfg = pusch.sch.uci; pusch_info.uci_cfg = pusch.sch.uci;
pusch_info.pid = pusch.pid; pusch_info.pid = pusch.pid;
pusch_info.pdu = srsran::make_byte_buffer(); pusch_info.pdu = srsran::make_byte_buffer();
pusch_info.pusch_data.tb[0].payload = pusch_info.pdu->data(); if (pusch_info.pdu == nullptr) {
pusch_info.pusch_data.tb[1].payload = pusch_info.pdu->data(); logger.error("Couldn't allocate PDU in %s().", __FUNCTION__);
return false;
}
pusch_info.pusch_data.tb[0].payload = pusch_info.pdu->data();
// Decode PUSCH // Decode PUSCH
if (srsran_gnb_ul_get_pusch(&gnb_ul, &ul_slot_cfg, &pusch.sch, &pusch.sch.grant, &pusch_info.pusch_data) < if (srsran_gnb_ul_get_pusch(&gnb_ul, &ul_slot_cfg, &pusch.sch, &pusch.sch.grant, &pusch_info.pusch_data) <

Loading…
Cancel
Save