mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-29 19:28:47 -05:00
Fixed possible memory leak in green FFT (g_fft)
This commit is contained in:
parent
790e5d3bc8
commit
ffbc08841e
@ -3247,7 +3247,9 @@ void g_fft<FFT_TYPE>::fftInit()
|
||||
FFT_table_2[FFT_N/2] = new short[POW2(FFT_N/2 - 1)];
|
||||
fftBRInit(FFT_N, FFT_table_2[FFT_N/2]);
|
||||
|
||||
FFT_table_2[(FFT_N - 1) / 2] = new short[POW2((FFT_N - 1) / 2 - 1)];
|
||||
if ((FFT_N % 2) == 0) { // FFT_N/2 = (FFT_N-1)/2 if FFT_N is odd. Prevents memory leak
|
||||
FFT_table_2[(FFT_N - 1) / 2] = new short[POW2((FFT_N - 1) / 2 - 1)];
|
||||
}
|
||||
fftBRInit(FFT_N - 1, FFT_table_2[(FFT_N - 1) / 2]);
|
||||
|
||||
Utbl = ((FFT_TYPE**) FFT_table_1)[FFT_N];
|
||||
|
Loading…
Reference in New Issue
Block a user