From patchwork Fri Nov 29 05:56:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 16483 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 F113044A56E for ; Fri, 29 Nov 2019 07:56:50 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D2C9768B28B; Fri, 29 Nov 2019 07:56:50 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D2BF768B089 for ; Fri, 29 Nov 2019 07:56:42 +0200 (EET) X-QQ-mid: bizesmtp20t1575006994tmp5f706 Received: from localhost (unknown [47.90.47.25]) by esmtp6.qq.com (ESMTP) with id ; Fri, 29 Nov 2019 13:56:34 +0800 (CST) X-QQ-SSF: 01100000003000K0ZSF1000A0000000 X-QQ-FEAT: 8GRh8dgRWfeiSEoQK5s0D0JB8XXNbX1o664VQmAKZU3Gg8Ys+1WsZLuAtjsaz IobmvSa6PolLMdX5JT7t/+HRu3MrZ+SfhqCMnCMte9GIxdJ9G1FuFfNfLuNlGsCGrdNG1eV KjNY+Una8rvhi1QQfWRPHwrnTK07xzOiCsBsahGaJDLFIc2n8jUfiylmKMGD8ehFTZ2S41/ n4pM7y9QmjvolPgq06uJGuSrf888VkbzEAWMa/kGUzyZqDgau5n5kTc3HmI4b2p5U0ARYOS bQ7R2akqlnBsjNnwwSooMH7rRzjtppFy1905ofL/df4fxUU3VWNZjiX44GoHIdOaLKdA== X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Fri, 29 Nov 2019 13:56:32 +0800 Message-Id: <20191129055632.30294-1-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1.382.ga23ca1b.dirty X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH] avformat/utils: set the AVFormatContext to NULL before return from avformat_free_context 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/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 8196442dd1..0461aa83ec 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4469,6 +4469,7 @@ void avformat_free_context(AVFormatContext *s) av_freep(&s->internal); av_freep(&s->url); av_free(s); + s = NULL; } void avformat_close_input(AVFormatContext **ps)