Fix uninitialized field on custom mode malloc fail

This commit is contained in:
Mark Harris 2022-07-06 22:45:41 -07:00
parent 4ad7d21081
commit f1b088001e
No known key found for this signature in database
GPG key ID: 92293B4D0118BDB0

View file

@ -173,7 +173,10 @@ static void compute_allocation_table(CELTMode *mode)
mode->nbAllocVectors = BITALLOC_SIZE;
allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands));
if (allocVectors==NULL)
{
mode->allocVectors = NULL;
return;
}
/* Check for standard mode */
if (mode->Fs == 400*(opus_int32)mode->shortMdctSize)