From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 05EE44F50B for ; Tue, 17 Jun 2025 14:24:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 67AB168D296; Tue, 17 Jun 2025 17:24:01 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 2995468C4F1 for ; Tue, 17 Jun 2025 17:23:55 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 55HENseX000426 ; Tue, 17 Jun 2025 16:23:54 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 2B6032EFE4; Tue, 17 Jun 2025 16:23:54 +0200 (CEST) Date: Tue, 17 Jun 2025 16:23:54 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <20250617141416.950239-1-502024330056@smail.nju.edu.cn> <20250617141416.950239-4-502024330056@smail.nju.edu.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250617141416.950239-4-502024330056@smail.nju.edu.cn> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 17 Jun 2025 16:23:54 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH 3/4] avformat/sbgdec: fix leak in sbg_read_header() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Lidong Yan <502024330056@smail.nju.edu.cn> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Lidong Yan (HE12025-06-17): > In sbg_read_header(), if avformat_new_stream() failed, it returns > without cleanup, which may cause memory leaks. Replace return statement > with goto so that we would first clean up then return. > > Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> > --- > libavformat/sbgdec.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) LGTM, thanks. Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".