From: RĂ©mi Duraffort Date: Wed, 21 Jul 2010 16:32:28 +0000 (+0200) Subject: faad: fix potential memleak. X-Git-Tag: 1.2.0-pre1~5727 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=ab9825861e7e51408d1addb1f1e77fb03f900abf faad: fix potential memleak. --- diff --git a/modules/codec/faad.c b/modules/codec/faad.c index 7bda944a86..6d1c927f48 100644 --- a/modules/codec/faad.c +++ b/modules/codec/faad.c @@ -131,6 +131,7 @@ static int Open( vlc_object_t *p_this ) if( ( p_sys->hfaad = faacDecOpen() ) == NULL ) { msg_Err( p_dec, "cannot initialize faad" ); + free( p_sys ); return VLC_EGENERIC; } @@ -158,6 +159,8 @@ static int Open( vlc_object_t *p_this ) &i_rate, &i_channels ) < 0 ) { msg_Err( p_dec, "Failed to initialize faad using extra data" ); + faacDecClose( p_sys->hfaad ); + free( p_sys ); return VLC_EGENERIC; }