Commit 3762a689 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

fix memory bug

parent 9e1250bb
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1291,10 +1291,14 @@ ivas_error ivas_dirac_alloc_mem_fx(

    /* PSD related buffers */
    hDirAC_mem->cy_auto_dir_smooth_fx = NULL;
#ifdef FIX_867
	hDirAC_mem->q_cy_auto_dir_smooth = NULL;
#endif
    hDirAC_mem->proto_power_smooth_fx = NULL;
    hDirAC_mem->proto_power_diff_smooth_fx = NULL;
    hDirAC_mem->direct_responses_square_fx = NULL;
    hDirAC_mem->frame_dec_f_fx = NULL;

    IF( NE_32( hDirACRend->synthesisConf, DIRAC_SYNTHESIS_GAIN_SHD ) )
    {
        IF( ( hDirAC_mem->cy_auto_dir_smooth_fx = (Word32 *) malloc( sizeof( Word32 ) * size ) ) == NULL )
@@ -1368,7 +1372,10 @@ ivas_error ivas_dirac_alloc_mem_fx(
    hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_fx = hDirAC_mem->cy_auto_dir_smooth_fx;
#ifdef FIX_867
    hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth = hDirAC_mem->q_cy_auto_dir_smooth;
	if (hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth )
	{
		set16_zero_fx( hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth, hDirACRend->h_output_synthesis_psd_state.cy_auto_dir_smooth_len );
	}
#else
    hDirACRend->h_output_synthesis_psd_state.q_cy_auto_dir_smooth = 0;
#endif