[vlc-commits] commit: faad: fix potential memleak. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Wed Jul 21 21:58:28 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 21 18:32:28 2010 +0200| [de23306c3b4efbc4beae4e21499e8ac68fb13176] | committer: Rémi Duraffort
faad: fix potential memleak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de23306c3b4efbc4beae4e21499e8ac68fb13176
---
modules/codec/faad.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 7bda944..6d1c927 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;
}
More information about the vlc-commits
mailing list