Commit fc1e5cd7 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential memleak.

parent bc727d2d
......@@ -103,7 +103,10 @@ static int Create( vlc_object_t *p_this )
p_sys->p_prev_sample = malloc(
p_filter->input.i_channels * sizeof(int32_t) );
if( p_sys->p_prev_sample == NULL )
{
free( p_sys );
return VLC_ENOMEM;
}
aout_DateInit( &p_sys->end_date, p_filter->output.i_rate );
p_filter->pf_do_work = DoWork;
......
......@@ -142,6 +142,8 @@ static int Open( vlc_object_t *p_this )
/* Allocate structure */
p_sys = p_filter->p_sys = (aout_filter_sys_t*)malloc( sizeof( aout_filter_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
vlc_mutex_init( &p_sys->lock );
p_sys->p_reverbm = new revmodel();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment