fix mem leak in sync

master
Andre Puschmann 7 years ago
parent 9553784e2f
commit 44b1748a87

@ -152,21 +152,19 @@ clean_exit:
void srslte_sync_free(srslte_sync_t *q)
{
if (q) {
srslte_pss_free(&q->pss);
srslte_sss_free(&q->sss);
srslte_cfo_free(&q->cfo_corr_frame);
srslte_cfo_free(&q->cfo_corr_symbol);
srslte_cp_synch_free(&q->cp_synch);
if (q->cfo_i_initiated) {
for (int i=0;i<2;i++) {
for (int i = 0; i < 2; i++) {
if (q->cfo_i_corr[i]) {
free(q->cfo_i_corr[i]);
}
srslte_pss_free(&q->pss_i[i]);
}
}
if (q->temp) {
free(q->temp);
}

Loading…
Cancel
Save