From patchwork Fri May 8 10:33:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 19553 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 D14C844A321 for ; Fri, 8 May 2020 13:34:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B0A1B6897D6; Fri, 8 May 2020 13:34:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4064687F7D for ; Fri, 8 May 2020 13:34:36 +0300 (EEST) X-QQ-mid: bizesmtp22t1588934070tvsx1m0o Received: from localhost (unknown [103.107.216.231]) by esmtp6.qq.com (ESMTP) with id ; Fri, 08 May 2020 18:34:28 +0800 (CST) X-QQ-SSF: 01100000002000Y0ZXF0B00A0000000 X-QQ-FEAT: s8YYpWqVDdfXNCNZ2woI5HD0pGsa80dBa3RYlFh0VN29vqoaCjnuAKA09GCfS alnfdWxR5Fvejirz6T719IfO5KAK0WXS6i1NazeGdgksAEMhVr/Y8X68wIxx4vAUtBKPBs1 GonjHDpwf4hR/HuEeEJIHpu3P+ZjlbDYuSQhcmeakodcuxEENsGD2N7JtgKh7PlKDkcHIH1 T4R92p8FWecOAEjpTeaUM4JTOUbbQ0yhtRZeTONKAZz3mLAbp/OU2Xw4Vu/qqqgYLJQkCBT 0/FV9+xPCpI7epLkeNlrSs7rK61HBGvdjsJrvFL44AlPUb5o3WtLdNj6wsPp10HEoMs0vNs PUqb5sq X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 8 May 2020 18:33:59 +0800 Message-Id: <20200508103359.65143-3-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200508103359.65143-1-lq@chinaffmpeg.org> References: <20200508103359.65143-1-lq@chinaffmpeg.org> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign7 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH 3/3] avformat/hlsenc: free options fix memleak in hls_write_trailer 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 Cc: Steven Liu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 307aba2efa..eb12b4a7f8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2679,9 +2679,10 @@ static int hls_write_trailer(struct AVFormatContext *s) if (ret < 0) av_log(s, AV_LOG_WARNING, "Failed to upload file '%s' at the end.\n", oc->url); } - av_freep(&vs->temp_buffer); failed: + av_freep(&vs->temp_buffer); + av_dict_free(&options); av_freep(&filename); av_write_trailer(oc); if (oc->url[0]) {