[FFmpeg-devel] [PATCH] lavd/xv: fix memory leak

Stefano Sabatini stefasab at gmail.com
Wed Nov 13 11:41:08 CET 2013


On date Tuesday 2013-11-12 22:38:14 +0100, Lukasz Marek encoded:
> Results of XvQueryAdaptors have to be freed with XvFreeAdaptorInfo.
> 
> Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> ---
>  libavdevice/xv.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavdevice/xv.c b/libavdevice/xv.c
> index 3b377f8..50d72a5 100644
> --- a/libavdevice/xv.c
> +++ b/libavdevice/xv.c
> @@ -97,6 +97,7 @@ static int xv_write_header(AVFormatContext *s)
>      if (XvQueryAdaptors(xv->display, DefaultRootWindow(xv->display), &num_adaptors, &ai) != Success)
>          return AVERROR_EXTERNAL;
>      xv->xv_port = ai[0].base_id;
> +    XvFreeAdaptorInfo(ai);
>  
>      if (encctx->pix_fmt != AV_PIX_FMT_YUV420P) {
>          av_log(s, AV_LOG_ERROR,
> -- 
> 1.7.10.4

Applied, thanks.
-- 
FFmpeg = Fanciful and Faithless Magical Power Everlasting Geek


More information about the ffmpeg-devel mailing list