ASAN: memory leaks with format switching in lib_dec/ivas_init_dec.c:2321:53
### Basic Info - Commit SHA: 5e9d6b8c ### Bug description ASAN found an memory leaks error at lib_dec/ivas_init_dec.c:2321:53: ``` ==2996923==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32 byte(s) in 2 object(s) allocated from: #0 0x61d36c9c74d3 in malloc (/home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/IVAS_dec+0x1264d3) (BuildId: f7f8ae1760a4792ead84249a81572e074955d944) #1 0x61d36cc017d1 in ivas_init_decoder /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/lib_dec/ivas_init_dec.c:2321:53 #2 0x61d36cbf6c0b in ivas_dec_setup /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/lib_dec/ivas_init_dec.c:1028:24 #3 0x61d36ca29abe in ivas_dec_setup_all /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/lib_dec/lib_dec.c:2374:28 #4 0x61d36ca27dea in IVAS_DEC_GetSamplesDecoder /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/lib_dec/lib_dec.c:1314:24 #5 0x61d36ca166f1 in decodeG192 /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/apps/decoder.c:2685:32 #6 0x61d36ca07d70 in main /home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/apps/decoder.c:797:17 #7 0x7c729a62a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #8 0x7c729a62a28a in __libc_start_main csu/../csu/libc-start.c:360:3 #9 0x61d36c92c684 in _start (/home/gitlab-runner/builds/xPotPWfvP/0/rep/ivas-codec-pc/ivas-codec/IVAS_dec+0x8b684) (BuildId: f7f8ae1760a4792ead84249a81572e074955d944) SUMMARY: AddressSanitizer: 32 byte(s) leaked in 2 allocation(s). ``` ### How to reproduce Build with ``` make clean make -j CLANG=2 ``` Then run [from-MASA1TC_ISM2-to-HOA3.192](/uploads/2f9aa756d1f90102d85e6658c5d9ce59/from-MASA1TC_ISM2-to-HOA3.192) ``` IVAS_dec -fr 20 MONO 48 from-MASA1TC_ISM2-to-HOA3.192 from-MASA1TC_ISM2-to-HOA3-dec_to-MONO.wav ``` or ``` python3 -m pytest "test_format_switching[MASA1TC_ISM2-HOA3-g192-MONO]" -n auto --update_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec ```
issue