]> git.sesse.net Git - vlc/commitdiff
* memleak if normvol filter cannot be used.
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 7 Nov 2006 15:45:27 +0000 (15:45 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 7 Nov 2006 15:45:27 +0000 (15:45 +0000)
modules/audio_filter/normvol.c

index 80cb8f38e0c48c7edc2ad02bd71d658af4098cc8..05886c44f72a73eb274a3079c41d23207a099fc8 100644 (file)
@@ -100,8 +100,7 @@ static int Open( vlc_object_t *p_this )
     aout_filter_t *p_filter = (aout_filter_t*)p_this;
     vlc_bool_t b_fit = VLC_TRUE;
     int i_channels;
-    aout_filter_sys_t *p_sys = p_filter->p_sys =
-        malloc( sizeof( aout_filter_sys_t ) );
+    aout_filter_sys_t *p_sys;
 
     if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
         p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
@@ -130,6 +129,7 @@ static int Open( vlc_object_t *p_this )
 
     i_channels = aout_FormatNbChannels( &p_filter->input );
 
+    p_sys = p_filter->p_sys = malloc( sizeof( aout_filter_sys_t ) );
     p_sys->i_nb = var_CreateGetInteger( p_filter->p_parent, "norm-buff-size" );
     p_sys->f_max = var_CreateGetFloat( p_filter->p_parent, "norm-max-level" );