Commit 71966789 authored by Robert Schmidt's avatar Robert Schmidt

Prevent memory leak in L2 sim due to NFAPI

parent 6ec6c8b2
...@@ -1288,6 +1288,13 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg) ...@@ -1288,6 +1288,13 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
} }
if(tx_request_pdu_list!=NULL) { if(tx_request_pdu_list!=NULL) {
for (int i = 0; i < tx_req_num_elems; i++) {
for (int j = 0; j < tx_request_pdu_list[i].num_segments; j++) {
free(tx_request_pdu_list[i].segments[j].segment_data);
tx_request_pdu_list[i].segments[j].segment_data = NULL;
}
}
tx_req_num_elems = 0;
free(tx_request_pdu_list); free(tx_request_pdu_list);
tx_request_pdu_list = NULL; tx_request_pdu_list = NULL;
} }
......
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