diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index dd72aaa1b167a1bfbbb683af15331ce92ee14550..6226beca29772f5d7dc6acbcc827e95244e581d3 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -352,11 +352,11 @@ void IVAS_DEC_Close( ( *phIvasDec )->hVoIP = NULL; } - /* destroy Split binaural renderer (ISAR) handle */ - ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); - if ( ( *phIvasDec )->st_ivas ) { + /* destroy Split binaural renderer (ISAR) handle */ + ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); + ivas_destroy_dec( ( *phIvasDec )->st_ivas ); ( *phIvasDec )->st_ivas = NULL; } @@ -5361,10 +5361,10 @@ static void ivas_destroy_handle_isar( { free( ( *hSplitBinRend )->hCldfbDataOut ); ( *hSplitBinRend )->hCldfbDataOut = NULL; - - free( ( *hSplitBinRend ) ); - ( *hSplitBinRend ) = NULL; } + + free( ( *hSplitBinRend ) ); + ( *hSplitBinRend ) = NULL; } return;