Instead of removing the frees we allocated from heap.
In SA mode, there were DCI_INDs and RX_INDS that were allocated on the stack and were assigned to pointers used in the MAC instance. In NSA mode we allocated these members on the heap so we free'd them once we were done. In SA mode, they were not allocated on the heap so this free call caused an a free() error. We have now allocated these pointers on the heap to avoid this error and ensure the pointers are correct.
This commit is contained in:
@@ -958,16 +958,11 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
|
||||
}
|
||||
|
||||
//clean up nr_downlink_indication_t *dl_info
|
||||
if (get_softmodem_params()->nsa) {
|
||||
if (dl_info->dci_ind != NULL) {
|
||||
free(dl_info->dci_ind);
|
||||
dl_info->dci_ind = NULL;
|
||||
}
|
||||
if (dl_info->rx_ind != NULL) {
|
||||
free(dl_info->rx_ind);
|
||||
dl_info->rx_ind = NULL;
|
||||
}
|
||||
}
|
||||
free(dl_info->dci_ind);
|
||||
dl_info->dci_ind = NULL;
|
||||
free(dl_info->rx_ind);
|
||||
dl_info->rx_ind = NULL;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user