Commit 0609d31d authored by Rúben Soares Silva's avatar Rúben Soares Silva Committed by Robert Schmidt

Only copy RX_DATA.indication pdu if there's data

parent 83838962
......@@ -203,8 +203,11 @@ int aerial_phy_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
rx_ind->pdu_list[j].ul_cqi = ind->pdu_list[j].ul_cqi;
rx_ind->pdu_list[j].timing_advance = ind->pdu_list[j].timing_advance;
rx_ind->pdu_list[j].rssi = ind->pdu_list[j].rssi;
rx_ind->pdu_list[j].pdu = calloc(rx_ind->pdu_list[j].pdu_length, sizeof(uint8_t));
memcpy(rx_ind->pdu_list[j].pdu,ind->pdu_list[j].pdu,ind->pdu_list[j].pdu_length);
// Only copy PDU data if there's any to copy
if (rx_ind->pdu_list[j].pdu_length > 0) {
rx_ind->pdu_list[j].pdu = calloc(rx_ind->pdu_list[j].pdu_length, sizeof(uint8_t));
memcpy(rx_ind->pdu_list[j].pdu, ind->pdu_list[j].pdu, ind->pdu_list[j].pdu_length);
}
LOG_D(NR_MAC,
"(%d.%d) Handle %d for index %d, RNTI, %04x, HARQID %d\n",
ind->sfn,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment