Merge pull request #11573 from Pokechu22/freesurround-bad-delete

Externals/FreeSurround: Fix pointer created through new[] being freed via delete
This commit is contained in:
Mai 2023-02-16 03:44:33 -05:00 committed by GitHub
commit f004080382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -31,10 +31,8 @@ DPL2FSDecoder::DPL2FSDecoder() {
}
DPL2FSDecoder::~DPL2FSDecoder() {
#pragma warning(suppress : 4150)
delete forward;
#pragma warning(suppress : 4150)
delete inverse;
kiss_fftr_free(forward);
kiss_fftr_free(inverse);
}
void DPL2FSDecoder::Init(channel_setup chsetup, unsigned int blsize,

View File

@ -65,7 +65,7 @@ kiss_fftr_cfg kiss_fftr_alloc(int nfft, int inverse_fft, void *mem,
sizeof(kiss_fft_cpx) * (nfft * 3 / 2);
if (lenmem == NULL) {
st = (kiss_fftr_cfg) new char[memneeded];
st = (kiss_fftr_cfg)malloc(memneeded);
} else {
if (*lenmem >= memneeded)
st = (kiss_fftr_cfg)mem;