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 E4B5045537 for ; Tue, 31 Jan 2023 20:43:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5912E68BE81; Tue, 31 Jan 2023 22:43:46 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A1A068BE04 for ; Tue, 31 Jan 2023 22:43:40 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 1C034E0004 for ; Tue, 31 Jan 2023 20:43:38 +0000 (UTC) Date: Tue, 31 Jan 2023 21:43:36 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230131204336.GL1949656@pb2> References: <20230130234527.13149-1-michael@niedermayer.cc> <20230130234527.13149-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 3/3] libavformat/lafdec: free data 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="===============3876782939348364528==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3876782939348364528== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wRcdkz6hei1hwa3U" Content-Disposition: inline --wRcdkz6hei1hwa3U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 31, 2023 at 12:25:25PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: memleak > >=20 > > Signed-off-by: Michael Niedermayer > > --- > > libavformat/lafdec.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > >=20 > > diff --git a/libavformat/lafdec.c b/libavformat/lafdec.c > > index b78ec3649c..f6d2d5f235 100644 > > --- a/libavformat/lafdec.c > > +++ b/libavformat/lafdec.c > > @@ -253,6 +253,15 @@ again: > > return 0; > > } > > =20 > > +static int laf_read_close(AVFormatContext *ctx) > > +{ > > + LAFContext *s =3D ctx->priv_data; > > + > > + av_freep(&s->data); > > + > > + return 0; > > +} > > + > > static int laf_read_seek(AVFormatContext *ctx, int stream_index, > > int64_t timestamp, int flags) > > { > > @@ -270,6 +279,7 @@ const AVInputFormat ff_laf_demuxer =3D { > > .read_probe =3D laf_probe, > > .read_header =3D laf_read_header, > > .read_packet =3D laf_read_packet, > > + .read_close =3D laf_read_close, > > .read_seek =3D laf_read_seek, > > .extensions =3D "laf", > > .flags =3D AVFMT_GENERIC_INDEX, >=20 > Needs the FF_FMT_INIT_CLEANUP flag, too (otherwise it will leak in case > of avformat_new_stream() failure). ok, will apply with this thx --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway --wRcdkz6hei1hwa3U Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY9l9cAAKCRBhHseHBAsP q7w/AJ9sTdL3OdVocbTi+UPfAkjfR4dNZACcCuvoOlgP3aRZapeIU1TUvJIEHas= =6UDN -----END PGP SIGNATURE----- --wRcdkz6hei1hwa3U-- --===============3876782939348364528== 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". --===============3876782939348364528==--