[FFmpeg-devel] [PATCH] tiff: fix leaking yuv_line

Michael Niedermayer michael at niedermayer.cc
Thu Feb 16 04:15:35 EET 2017


On Thu, Feb 16, 2017 at 12:23:28AM +0100, Andreas Cadhalpun wrote:
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavcodec/tiff.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
> index efbd9791a5..474ea90015 100644
> --- a/libavcodec/tiff.c
> +++ b/libavcodec/tiff.c
> @@ -1386,6 +1386,7 @@ static av_cold int tiff_end(AVCodecContext *avctx)
>  
>      ff_lzw_decode_close(&s->lzw);
>      av_freep(&s->deinvert_buf);
> +    av_freep(&s->yuv_line);
>      return 0;

I assume we are missing a test in fate for the yuv case
adding such test would be usefull

yuv_line_size should be reset to 0, not sure its ever needed but it
feels more proper

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170216/d76f4541/attachment.sig>


More information about the ffmpeg-devel mailing list