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 718F04CED1 for ; Mon, 11 Aug 2025 21:09:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 44C3668CC19; Tue, 12 Aug 2025 00:09:09 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id A2B4368CA1E for ; Tue, 12 Aug 2025 00:09:02 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0E06341C06 for ; Mon, 11 Aug 2025 21:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1754946542; 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=Drnkyt0ZMy+09M+BRk6JYWAztjAs1vKmMl5jgUv49cc=; b=jG/s8SH9D0aCg7XuyGaB/a9WuD2SFKWFcxPs3VjtZxPmKAHfb6dc10uG4rKn2sEJCcdU7Z NipYYb9BzrDFgeCXvqqIXCk+Q21Cd/lIDqwYGwdueZr2EiT3GKyP2RUKNvzRqxfabjfxne S/8SYch8+JcpCcZxCwpvuAoyJf2qTFGUs5wVw7GRzHfs5IWFi/kwT3Wuyp3nHR0PHOyYLO l80VgJ7TYE3/t33jFBnoiCklrnGQ9YT+RnekjlGG7zEkLYk5lNw2NDW6pLv+YEoaRBzbK5 27ioaIEw+LUr0GpZQW8M387l2rld27+U78haLhQ4V60OtRFG/9COxLoLggsp2g== Date: Mon, 11 Aug 2025 23:09:01 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250811210901.GC29660@pb2> References: <20250809031020.25781-1-jiashengjiangcool@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250809031020.25781-1-jiashengjiangcool@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddufeefgeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttdejnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeelkeeggfffiedufeejueffjeduhedttdduledtheevveevtdeiueelhfdtuedtkeenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] tools/scale_slice_test: Add av_frame_free() to avoid potential memory leaks 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="===============0661150140324334902==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0661150140324334902== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wKFDKZWPLpVygtyW" Content-Disposition: inline --wKFDKZWPLpVygtyW Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 09, 2025 at 03:10:20AM +0000, Jiasheng Jiang wrote: > Add av_frame_free() to release frame to avoid potential memory leaks. >=20 > Fixes: 5fdb5ed613 ("FATE: add a test for sliced scaling") > Signed-off-by: Jiasheng Jiang > --- > tools/scale_slice_test.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/tools/scale_slice_test.c b/tools/scale_slice_test.c > index 4480bf8569..a6b888090f 100644 > --- a/tools/scale_slice_test.c > +++ b/tools/scale_slice_test.c > @@ -157,6 +157,7 @@ int main(int argc, char **argv) > =20 > ret =3D av_frame_get_buffer(frame, 0); > if (ret < 0) { > + av_frame_free(&frame); > fprintf(stderr, "Error allocating frame data\n"); > return ret; > } > @@ -173,6 +174,7 @@ int main(int argc, char **argv) > =20 > ret =3D ds_open(&dc, filename, 0); > if (ret < 0) { > + av_frame_free(&frame); > fprintf(stderr, "Error opening the file\n"); > return ret; > } make -j32 fate-sws-slice-yuv422-12bit-rgb48 CC tools/scale_slice_test.o tools/scale_slice_test.c: In function =E2=80=98main=E2=80=99: tools/scale_slice_test.c:177:24: error: =E2=80=98frame=E2=80=99 undeclared = (first use in this function) 177 | av_frame_free(&frame); | ^~~~~ tools/scale_slice_test.c:177:24: note: each undeclared identifier is report= ed only once for each function it appears in make: *** [ffbuild/common.mak:81: tools/scale_slice_test.o] Error 1 [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. --wKFDKZWPLpVygtyW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaJpb6QAKCRBhHseHBAsP q6gYAKCVN6El5ZxB1Dg6D7M1OBZRsd7jJgCcC3YCKKgQeIRflSfZD3OodBxxqY4= =GK9/ -----END PGP SIGNATURE----- --wKFDKZWPLpVygtyW-- --===============0661150140324334902== 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". --===============0661150140324334902==--