From patchwork Thu Oct 10 02:07:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Liu X-Patchwork-Id: 15652 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 6DFC8446632 for ; Thu, 10 Oct 2019 05:08:21 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5643E6881DF; Thu, 10 Oct 2019 05:08:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DAC996881D6 for ; Thu, 10 Oct 2019 05:08:13 +0300 (EEST) X-QQ-mid: bizesmtp21t1570673288t8gv9lds Received: from localhost (unknown [47.90.47.25]) by esmtp6.qq.com (ESMTP) with id ; Thu, 10 Oct 2019 10:08:08 +0800 (CST) X-QQ-SSF: 01100000002000K0ZRF1B00A0000000 X-QQ-FEAT: lnX0O/e06ZBXr1KgDSCTBhdeoiHDamK2SRvdqDz4gbIKjyClDGS9rk98U+1tm 6LSerJZKHZ0dUsI+PoRf34b1OxMs0WFYzKBepmwpOAdhppkF1FA9pE6tbhQCsD4fHLAI62f r8bm+7N61lXA5kPvR3tjctE6z/10c7Ihieu54W+v6k19qRPVsPkzZW51S+9AQV36FEOGSU/ WgKsGXrA2b+QqeCU6GgiHa1rXxoYj68YVAFrkf/YW5M86AYtmyGAne6a33SM3Wq/20OwyOs wCWmTGbVpJuqMmFsH8vDmXmLuRIErt+ugCX7oClqA4SZjIGn6gnFUQG3s= X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Thu, 10 Oct 2019 10:07:53 +0800 Message-Id: <20191010020756.30820-5-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1.382.ga23ca1b.dirty In-Reply-To: <20191010020756.30820-1-lq@chinaffmpeg.org> References: <20191010020756.30820-1-lq@chinaffmpeg.org> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH v2 5/8] avformat/rtmpproto: fix memleak when open rtmp failed 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Steven Liu --- libavformat/rtmpproto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index eb08d4d424..688a740b87 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2880,6 +2880,9 @@ reconnect: return 0; fail: + av_free(&rt->playpath); + av_free(&rt->tcurl); + av_free(&rt->flashver); av_dict_free(opts); rtmp_close(s); return ret;