From f3c5c278e75ee194381d8041d2cda75f580c4701 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 16 Jan 2026 09:45:39 +0200 Subject: [PATCH 1/2] Fix basop issue 2333 by adding a missing free --- lib_com/options.h | 1 + lib_rend/ivas_mcmasa_ana_fx.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a884d61ec..d48194109 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -100,6 +100,7 @@ #define OPT_BE_2311_HARM_GSC_GAIN /* VA: issue 2311: BE part of the GSC gain harmonization pipeline #70380 shows the BE */ #define HARM_CORECODER_UPDT /* VA: basop issue 2342: Remove duplicated code in core-coder common update functions */ #define HARM_CORE_SW /* VA: basop issue 2314: Remove duplicated code in the core switching */ +#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 b2a4e0d00..54a8f485e 100644 --- a/lib_rend/ivas_mcmasa_ana_fx.c +++ b/lib_rend/ivas_mcmasa_ana_fx.c @@ -431,6 +431,17 @@ void ivas_mcmasa_ana_close( 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++ ) -- GitLab From 21c04e32b2573e80d7789a5104e2e5469c4a60b5 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Mon, 19 Jan 2026 12:48:22 +0200 Subject: [PATCH 2/2] Reorder a bit to make flow logical. --- lib_rend/ivas_mcmasa_ana_fx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_rend/ivas_mcmasa_ana_fx.c b/lib_rend/ivas_mcmasa_ana_fx.c index 54a8f485e..8b6659b3e 100644 --- a/lib_rend/ivas_mcmasa_ana_fx.c +++ b/lib_rend/ivas_mcmasa_ana_fx.c @@ -423,12 +423,6 @@ void ivas_mcmasa_ana_close( ( *hMcMasa )->direction_vector_m_fx[i][j] = NULL; } - 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; #ifdef FIX_BASOP_2333_MCMASA_ANA_MEMORY_LEAK @@ -442,6 +436,12 @@ void ivas_mcmasa_ana_close( 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; + } } FOR( j = 0; j < DIRAC_NO_COL_AVG_DIFF; j++ ) -- GitLab