[vlc-devel] [vlc-commit] avcodec: fix memory leak

KO Myung-Hun komh78 at gmail.com
Sun Dec 6 04:34:34 CET 2015


Hi/2.

This commit causes SIGSEGV in avcodec_plugin when playing a media or
seeking.

Hannes Domani wrote:
> vlc/vlc-2.2 | branch: master | Hannes Domani <ssbssa at yahoo.de> | Tue Jul 28 18:12:27 2015 +0200| [4b2099b13f8018347ca0c054580b76bebab5b20a] | committer: Jean-Baptiste Kempf
> 
> avcodec: fix memory leak
> 
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> (cherry picked from commit 7a06d63a3b8be54d7994d68b4ac7c9c05210a815)
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> 
>> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=4b2099b13f8018347ca0c054580b76bebab5b20a
> ---
> 
>  modules/codec/avcodec/audio.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
> index 34c8352..ae2f9dd 100644
> --- a/modules/codec/avcodec/audio.c
> +++ b/modules/codec/avcodec/audio.c
> @@ -395,6 +395,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
>          p_block = vlc_av_frame_Wrap(frame);
>          if (unlikely(p_block == NULL))
>              goto drop;
> +        frame = NULL;
>      }
>  #else
>      {
> @@ -449,6 +450,7 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
>  end:
>      *pp_block = NULL;
>  drop:
> +    av_frame_free(&frame);
>      if( p_block != NULL )
>          block_Release(p_block);
>      return NULL;

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the vlc-devel mailing list