From fae1e26631ed6d5d2d55d24ccadbcfe2e7f49f77 Mon Sep 17 00:00:00 2001 From: marc emerit Date: Mon, 29 Apr 2024 17:19:56 +0200 Subject: [PATCH] fix missing test --- lib_com/options.h | 1 + lib_util/hrtf_file_reader.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 43cb02520e..ce36afe4b7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,6 +160,7 @@ #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ +#define FIX_1077_MEMORY_TEST_MISSING /* orange: issue 1077 : add missing memory test*/ /* #################### End BE switches ################################## */ diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 813a3dfc27..c42d5c643a 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -1860,7 +1860,11 @@ ivas_error destroy_hrtf_statistics( IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics /* i/o: HRTF statistics handle */ ) { +#ifdef FIX_1077_MEMORY_TEST_MISSING + if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) ) +#else if ( hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == FALSE ) +#endif { free( ( *hHrtfStatistics )->average_energy_l ); free( ( *hHrtfStatistics )->average_energy_r ); -- GitLab