free dummy buffer in phch_recv

This commit is contained in:
Andre Puschmann 2018-05-14 09:32:47 +02:00
parent 75a6fa8e90
commit e5da6322ba
1 changed files with 6 additions and 1 deletions

View File

@ -366,7 +366,6 @@ void phch_recv::run_thread()
bool is_end_of_burst = false;
cf_t *dummy_buffer[SRSLTE_MAX_PORTS];
for (int i=0;i<SRSLTE_MAX_PORTS;i++) {
dummy_buffer[i] = (cf_t*) malloc(sizeof(cf_t)*SRSLTE_SF_LEN_PRB(100));
}
@ -555,6 +554,12 @@ void phch_recv::run_thread()
// Increase TTI counter
tti = (tti+1) % 10240;
}
for (int i=0;i<SRSLTE_MAX_PORTS;i++) {
if (dummy_buffer[i]) {
free(dummy_buffer[i]);
}
}
}