[vlc-devel] [PATCH] avcodec: fix double free on failure to open audio

Jean-Baptiste Kempf jb at videolan.org
Sun Feb 8 09:18:36 CET 2015


On 07 Feb, Alex Converse wrote :
> ---
>  modules/codec/avcodec/audio.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
> index a37f1cf..514f76d 100644
> --- a/modules/codec/avcodec/audio.c
> +++ b/modules/codec/avcodec/audio.c
> @@ -261,7 +261,6 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
>      /* ***** Open the codec ***** */
>      if( OpenAudioCodec( p_dec ) < 0 )
>      {
> -        av_free( p_context->extradata );
>          free( p_sys );
>          return VLC_EGENERIC;
>      }

I have a hard time seeing where the extradata is, in fact, freed.

And I guess we have the same issue with subtitle part.

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list