Commit a67f4057 authored by Rémi Duraffort's avatar Rémi Duraffort

faad: fix potential memleak.

(cherry picked from commit ab9825861e7e51408d1addb1f1e77fb03f900abf)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 1ad2daed
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment