Commit 70ba0cda authored by Robert Schmidt's avatar Robert Schmidt

Free rx_ind if dl_indication not called

parent 7b73a9e1
...@@ -601,7 +601,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -601,7 +601,6 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
#endif #endif
nr_downlink_indication_t dl_indication; nr_downlink_indication_t dl_indication;
//Fixme: on the heap to please the mandatory free in nr_ue_ul_indication()
fapi_nr_rx_indication_t *rx_ind=calloc(sizeof(*rx_ind),1); fapi_nr_rx_indication_t *rx_ind=calloc(sizeof(*rx_ind),1);
uint16_t number_pdus = 1; uint16_t number_pdus = 1;
...@@ -610,6 +609,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -610,6 +609,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
if (ue->if_inst && ue->if_inst->dl_indication) 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(rx_ind); // dl_indication would free(), so free() here if not called
return 0; return 0;
} }
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