diff options
Diffstat (limited to 'src/kiss_fft.c')
-rw-r--r-- | src/kiss_fft.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kiss_fft.c b/src/kiss_fft.c index d6b9f26..033cea0 100644 --- a/src/kiss_fft.c +++ b/src/kiss_fft.c @@ -449,6 +449,7 @@ kiss_fft_state *opus_fft_alloc_twiddles(int nfft,void * mem,size_t * lenmem, kiss_twiddle_cpx *twiddles; st->nfft=nfft; + st->bitrev = NULL; #ifdef FIXED_POINT st->scale_shift = celt_ilog2(st->nfft); if (st->nfft == 1<<st->scale_shift) @@ -506,7 +507,8 @@ void opus_fft_free(const kiss_fft_state *cfg, int arch) if (cfg) { opus_fft_free_arch((kiss_fft_state *)cfg, arch); - opus_free((opus_int16*)cfg->bitrev); + if (cfg->bitrev) + opus_free((opus_int16*)cfg->bitrev); if (cfg->shift < 0) opus_free((kiss_twiddle_cpx*)cfg->twiddles); opus_free((kiss_fft_state*)cfg); |