From patchwork Mon Dec 10 23:52:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Hetherington X-Patchwork-Id: 11368 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5ACF644CA78 for ; Tue, 11 Dec 2018 01:52:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AD6FD68A9D6; Tue, 11 Dec 2018 01:52:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8FA4468A933 for ; Tue, 11 Dec 2018 01:52:06 +0200 (EET) Received: from [178.62.213.41] (helo=main.carlh.net) by smtp.hosts.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim) (envelope-from ) id 1gWVLV-0003ji-9v for ffmpeg-devel@ffmpeg.org; Mon, 10 Dec 2018 23:52:17 +0000 Received: from carl (helo=localhost) by main.carlh.net with local-esmtp (Exim 4.89) (envelope-from ) id 1gWVLU-0005sS-DI for ffmpeg-devel@ffmpeg.org; Mon, 10 Dec 2018 23:52:16 +0000 Date: Mon, 10 Dec 2018 23:52:16 +0000 (GMT) From: Carl Hetherington X-X-Sender: carl@main.carlh.net To: ffmpeg-devel@ffmpeg.org Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: unknown@carlh.net X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on main.carlh.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Report: * -0.0 NO_RELAYS Informational: message was not relayed via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on main.carlh.net) Subject: [FFmpeg-devel] [PATCH] Fix leak of yuv_line in TiffContext. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Please review... I have used FFmpeg a lot but never suggested a patch before :) Signed-off-by: Carl Hetherington --- libavcodec/tiff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 751f23ef33..f71885d156 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1550,6 +1550,8 @@ static av_cold int tiff_end(AVCodecContext *avctx) ff_lzw_decode_close(&s->lzw); av_freep(&s->deinvert_buf); s->deinvert_buf_size = 0; + av_freep(&s->yuv_line); + s->yuv_line_size = 0; av_freep(&s->fax_buffer); s->fax_buffer_size = 0; return 0;