From f1b088001ecbc523ffb07109f301d8773bec44b8 Mon Sep 17 00:00:00 2001
From: Mark Harris <mark.hsj@gmail.com>
Date: Wed, 6 Jul 2022 22:45:41 -0700
Subject: [PATCH] Fix uninitialized field on custom mode malloc fail

---
 celt/modes.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/celt/modes.c b/celt/modes.c
index 390c5e8ae..23f7cde66 100644
--- a/celt/modes.c
+++ b/celt/modes.c
@@ -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)
-- 
GitLab