Commit dbecf7b4 authored by Robert Schmidt's avatar Robert Schmidt

prevent memory leak

parent 72236001
...@@ -2270,19 +2270,16 @@ void oai_subframe_ind(uint16_t sfn, uint16_t sf) { ...@@ -2270,19 +2270,16 @@ void oai_subframe_ind(uint16_t sfn, uint16_t sf) {
} }
} }
void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) { void handle_nr_slot_ind(uint16_t sfn, uint16_t slot)
{
//send VNF slot indication, which is aligned with TX thread, so that it can call the scheduler //send VNF slot indication, which is aligned with TX thread, so that it can call the scheduler
nfapi_nr_slot_indication_scf_t *ind; uint8_t slot_ahead = 6; // TODO ok?
ind = (nfapi_nr_slot_indication_scf_t *) malloc(sizeof(nfapi_nr_slot_indication_scf_t));
uint8_t slot_ahead = 6;
uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead); uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead);
uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx); uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx);
uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx); uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx);
ind->sfn = sfn_tx; nfapi_nr_slot_indication_scf_t ind = { .sfn = sfn_tx, .slot = slot_tx };
ind->slot = slot_tx; oai_nfapi_nr_slot_indication(&ind);
oai_nfapi_nr_slot_indication(ind);
//copy data from appropriate p7 slot buffers into channel structures for PHY processing //copy data from appropriate p7 slot buffers into channel structures for PHY processing
nfapi_pnf_p7_slot_ind(p7_config_g, p7_config_g->phy_id, sfn, slot); nfapi_pnf_p7_slot_ind(p7_config_g, p7_config_g->phy_id, sfn, slot);
......
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