diff --git a/lib/src/phy/fec/turbocoder.c b/lib/src/phy/fec/turbocoder.c index 09d484c58..e45c9a6b2 100644 --- a/lib/src/phy/fec/turbocoder.c +++ b/lib/src/phy/fec/turbocoder.c @@ -65,11 +65,12 @@ int srslte_tcod_init(srslte_tcod_t *h, uint32_t max_long_cb) { } void srslte_tcod_free(srslte_tcod_t *h) { + h->max_long_cb = 0; + if (h->temp) { + free(h->temp); + } + if (table_initiated) { - h->max_long_cb = 0; - if (h->temp) { - free(h->temp); - } for (int i = 0; i < 188; i++) { srslte_bit_interleaver_free(&tcod_interleavers[i]); }