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 B257947CA2 for ; Sun, 14 Jul 2024 11:38:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D223F68D9AF; Sun, 14 Jul 2024 14:38:05 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 353AA68D982 for ; Sun, 14 Jul 2024 14:37:59 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3995F240004 for ; Sun, 14 Jul 2024 11:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720957078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=phrQIRpbivxH7pScgk8ZDodLBxuMMnycgA5b5mCEgdY=; b=AHTnjFWqASWu4CUogMgmuXcc8RB4dzY5r0/I1PWEQcjJXhl3hEWBjguzAWm3YXJ4LN95Y7 1TsNroJVcr7Uoj5Bys1qV6QcFvmPmvSbq12ArKI9ieNH65DnfiU7OkKB7FgJJqLRJKP2QG RUwzTtQiqUak5ymVH/ij52Lk0/R5qGMggAcBOMJcydwf/MHfYVKjk5+X4P4oKQ9fZnOnkK JW8Gj+oUy/k6B6sb3kgmybcJ1gYM61WUBezWxSydxw25XFxoG5hzBW4L4ByyKiL5CimXEv 5lbLyyB68aykrnIwcjiykmvgluRph56ly8v8ZRckAovzXhU9bUFrS2aosacYUQ== Date: Sun, 14 Jul 2024 13:37:57 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240714113757.GC4991@pb2> References: <20240709144101.25919-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 In-Reply-To: <20240709144101.25919-1-ffmpeg@haasn.xyz> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] swscale/utils: fix leak on threaded ctx init failure 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-Type: multipart/mixed; boundary="===============0638633842822758177==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0638633842822758177== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IFNz2cKG26z512ZF" Content-Disposition: inline --IFNz2cKG26z512ZF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2024 at 04:41:01PM +0200, Niklas Haas wrote: > From: Niklas Haas >=20 > This count gets incremented after init succeeds, when it should be > incremented after *alloc* succeeds. Otherwise, we leak the context on > failure. >=20 > There are no negative consequences of incrementing for > allocated-but-not-initialized contexts, as the only functions that > reference it will, in the worst case, simply behave as if called on > allocated-but-not-initialized contexts, which is in line with expected > behavior when sws_init_context() fails. > --- > libswscale/utils.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) LGTM thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus --IFNz2cKG26z512ZF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZpO4kgAKCRBhHseHBAsP q2fDAKCGN2F+PvrArgqNnUU2W3Z3oIfgnQCggFd/+RI85qig3rSQC398zOUHgSY= =c6wk -----END PGP SIGNATURE----- --IFNz2cKG26z512ZF-- --===============0638633842822758177== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============0638633842822758177==--