Changeset 44370bcc9dc567fe04089e1be460829ac5ebc289

Show
Ignore:
Timestamp:
11/08/08 22:31:28 (4 months ago)
Author:
Rémi Duraffort <ivoire@videolan.org>
git-committer:
Rémi Duraffort <ivoire@videolan.org> 1218486688 +0200
git-parent:

[cef1653682e2b9b766f5b272bd5d180b44b976fa]

git-author:
Rémi Duraffort <ivoire@videolan.org> 1218486688 +0200
Message:

Fix memleak, check return value.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/audio_filter/equalizer.c

    r1d906a2 r44370bc  
    173173    /* Allocate structure */ 
    174174    p_sys = p_filter->p_sys = malloc( sizeof( aout_filter_sys_t ) ); 
     175    if( !p_sys ) 
     176        return VLC_ENOMEM; 
    175177 
    176178    if( EqzInit( p_filter, p_filter->input.i_rate ) ) 
     179    { 
     180        free( p_sys ); 
    177181        return VLC_EGENERIC; 
     182    } 
    178183 
    179184    return VLC_SUCCESS; 
     
    359364    p_sys->b_first = false; 
    360365 
     366    free( val1.psz_string ); 
     367 
    361368    /* Register preset bands (for intf) if : */ 
    362369    /* We have no bands info --> the preset info must be given to the intf */ 
     
    365372    { 
    366373        msg_Err(p_filter, "No preset selected"); 
     374        free( val2.psz_string ); 
    367375        return (VLC_EGENERIC); 
    368376    } 
     
    374382            var_SetFloat( p_aout, "equalizer-preamp", p_sys->f_newpreamp ); 
    375383    } 
     384    free( val2.psz_string ); 
    376385 
    377386    /* Add our own callbacks */ 
     
    468477 
    469478    free( p_sys->f_amp ); 
     479    free( p_sys->psz_newbands ); 
    470480} 
    471481