Commit 9a10acdb authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] set mem_hp20_out to NULL at init

parent 1ba2e349
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@
#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES              /* Dolby: remove unused ISAR */
#define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD          /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA: float issue 1585: alternative fix memory leaks with format switching */
#define FIX_MSAN_ASAN_FMSW_HP20                         /* FhG: float issue 1593: fix msan/asan error with format switching memory changes */

/* #################### End BE switches ################################## */

+4 −1
Original line number Diff line number Diff line
@@ -2327,7 +2327,7 @@ ivas_error ivas_init_decoder(
        set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM );
    }

#ifdef FIX_1585_ASAN_FORMAT_SW_ALT
#if defined( FIX_1585_ASAN_FORMAT_SW_ALT ) && !defined( FIX_MSAN_ASAN_FMSW_HP20 )
    for ( ; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->mem_hp20_out[i] = NULL;
@@ -2905,6 +2905,9 @@ void ivas_initialize_handles_dec(
    for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->p_output_f[i] = NULL;
#if defined( FIX_1585_ASAN_FORMAT_SW_ALT ) && defined( FIX_MSAN_ASAN_FMSW_HP20 )
        st_ivas->mem_hp20_out[i] = NULL;
#endif
    }

    return;