Commit 03bea315 authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Fix memory leak

parent 70d7a668
......@@ -928,14 +928,13 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
csirs_measurements.i1 = *i1;
csirs_measurements.i2 = *i2;
csirs_measurements.cqi = cqi;
nr_downlink_indication_t *dl_indication = calloc(sizeof(*dl_indication),1);
nr_downlink_indication_t dl_indication;
fapi_nr_rx_indication_t *rx_ind = calloc(sizeof(*rx_ind),1);
nr_fill_dl_indication(dl_indication, NULL, rx_ind, proc, ue, gNB_id, NULL);
nr_fill_dl_indication(&dl_indication, NULL, rx_ind, proc, ue, gNB_id, NULL);
nr_fill_rx_indication(rx_ind, FAPI_NR_CSIRS_IND, gNB_id, ue, NULL, NULL, 1, proc, (void *)&csirs_measurements);
if (ue->if_inst && ue->if_inst->dl_indication) {
ue->if_inst->dl_indication(dl_indication, NULL);
ue->if_inst->dl_indication(&dl_indication, NULL);
} else {
free(dl_indication);
free(rx_ind);
}
......
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