From ab9825861e7e51408d1addb1f1e77fb03f900abf Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Wed, 21 Jul 2010 18:32:28 +0200 Subject: [PATCH] faad: fix potential memleak. --- modules/codec/faad.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.2