From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 19A1E459B0 for ; Tue, 28 Feb 2023 16:05:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E1D568A546; Tue, 28 Feb 2023 18:05:44 +0200 (EET) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 08B0768A33A for ; Tue, 28 Feb 2023 18:05:38 +0200 (EET) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 935EE3C11EC for ; Tue, 28 Feb 2023 17:05:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1677600337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H5tcrWlu2U7U5Vr9RA5E3ItpC/rtktK49VyFe+lWx1M=; b=a/8/LG/isoxmCt+E9xY21AD2J/hfssofGvtsbtMHtcU4EtXsdWlllhxEK4/rrV892S2sBD 811QI2lCGvVcBD37BxO+jTjnt9KXCiVgHmSaLiAZ92jf6Ja4INWOMipDuoqeIWHQLc9UEg ud84GNBEp6G+gtjn7TTdq6yc3IfTFCYV+tgRBkGZe7MkfBdmjz1znWRJr492UpD4odbh+G fTwZJmvLFd1PU5Yp2OmxRjc98bwyZ72pY2MyCdpnPfpORyshHgkd9lPFEp4j8AwHn7QnS3 T/Oawx5PHH5vTa0OujcdFes6n1WgHQ0OBX57MG/BeEENOuJIP79n2ZXBT9HY5Q== Message-ID: <1dcc5fed-de31-6a17-34ab-20b0cfc6bbf0@rothenpieler.org> Date: Tue, 28 Feb 2023 17:05:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <18f49cd4-4af8-50f3-82b6-4f2bed2af362@rothenpieler.org> From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: fix NULL pointer dereference 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 28.02.2023 16:03, Zhao Zhili wrote: > I can move the check from here to close(). assert is helpful if it can catch > bugs during development. It doesn't help much here since this is a rare case > which doesn't triggered during development. Crashing with an assertion is still much better than dereferencing a NULL pointer. I'll have a look at the calling function in a bit, to see if it can be refactored to never run into the chance of calling this function when not needed. _______________________________________________ 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".