convolver: fix crash on FFT unload

Co-authored-by: Barnabás Pőcze <pobrn@protonmail.com>
This commit is contained in:
Dmitry Sharshakov 2022-08-17 13:37:37 +03:00
parent 68ff3ad841
commit 3ceb3288ca

View file

@ -232,9 +232,12 @@ static void convolver1_free(struct convolver1 *conv)
fft_cpx_free(&conv->segments[i]);
fft_cpx_free(&conv->segmentsIr[i]);
}
fft_destroy(conv->fft);
fft_destroy(conv->ifft);
fft_free(conv->fft_buffer);
if (conv->fft)
fft_destroy(conv->fft);
if (conv->ifft)
fft_destroy(conv->ifft);
if (conv->fft_buffer)
fft_free(conv->fft_buffer);
free(conv->segments);
free(conv->segmentsIr);
fft_cpx_free(&conv->pre_mult);