diff --git a/lib_com/options.h b/lib_com/options.h index fa1e49d4913db3113f193b4cc3a543562f1a8a0e..435b1503c9c0450076f53d6373c4991717cd354e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -114,6 +114,7 @@ #define FIX_BASOP_2328_MSAN_WRONG_ASSIGNMENT /* Nokia: basop issue 2328: Fix MSAN error by correcting the variable assignment */ #define FIX_BASOP_2329_UNINIT_VALUE /* Nokia: basop issue 2329: Fix issue by checking for structure instead of length */ #define FIX_BASOP_2332_ASAN_OVERFLOW_IN_EXT_DIRAC_REND /* Nokia: basop issue 2332: Uses predefined memory sizes instead computing wrong */ +#define FIX_BASOP_2333_MCMASA_ANA_MEMORY_LEAK /* Nokia: basop issue 2333: Add missing free for direction_vector_e to ivas_mcmasa_ana_fx.c */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/ivas_mcmasa_ana_fx.c b/lib_rend/ivas_mcmasa_ana_fx.c index 1e0becc38a2bd0938fe1f09d79f7481f473670d4..05d65ececfc1cc090502bed5171f531498167a70 100644 --- a/lib_rend/ivas_mcmasa_ana_fx.c +++ b/lib_rend/ivas_mcmasa_ana_fx.c @@ -423,14 +423,25 @@ void ivas_mcmasa_ana_close( ( *hMcMasa )->direction_vector_m_fx[i][j] = NULL; } + free( ( *hMcMasa )->direction_vector_m_fx[i] ); + ( *hMcMasa )->direction_vector_m_fx[i] = NULL; +#ifdef FIX_BASOP_2333_MCMASA_ANA_MEMORY_LEAK + + FOR( j = 0; j < MAX_PARAM_SPATIAL_SUBFRAMES; j++ ) + { + free( ( *hMcMasa )->direction_vector_e[i][j] ); + ( *hMcMasa )->direction_vector_e[i][j] = NULL; + } + + free( ( *hMcMasa )->direction_vector_e[i] ); + ( *hMcMasa )->direction_vector_e[i] = NULL; +#endif + FOR( j = 0; j < DIRAC_NO_COL_AVG_DIFF; j++ ) { free( ( *hMcMasa )->buffer_intensity_real_fx[i][j] ); ( *hMcMasa )->buffer_intensity_real_fx[i][j] = NULL; } - - free( ( *hMcMasa )->direction_vector_m_fx[i] ); - ( *hMcMasa )->direction_vector_m_fx[i] = NULL; } FOR( j = 0; j < DIRAC_NO_COL_AVG_DIFF; j++ )