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:
Melissa Elkadi
2021-10-26 15:48:03 -07:00
parent 0f1723a485
commit 0fd35a229a
3 changed files with 21 additions and 26 deletions
+5 -10
View File
@@ -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;
}