Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Fu, Ting" <ting.fu-at-intel.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF backend error handle
Date: Fri, 24 Mar 2023 07:54:54 +0000
Message-ID: <SN6PR11MB31178D44126CD4C7214A4A6BE6849@SN6PR11MB3117.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH7PR11MB5957FFD2146860DD79726A3DF1849@PH7PR11MB5957.namprd11.prod.outlook.com>



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Guo,
> Yejun
> Sent: Friday, March 24, 2023 11:49 AM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF
> backend error handle
> 
> 
> 
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Ting
> > Fu
> > Sent: Thursday, March 16, 2023 11:00 AM
> > To: ffmpeg-devel@ffmpeg.org
> > Subject: [FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF
> > backend error handle
> >
> > Signed-off-by: Ting Fu <ting.fu@intel.com>
> > ---
> >  libavfilter/dnn/dnn_backend_tf.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/libavfilter/dnn/dnn_backend_tf.c
> > b/libavfilter/dnn/dnn_backend_tf.c
> > index fb1a5f1350..5d809a8694 100644
> > --- a/libavfilter/dnn/dnn_backend_tf.c
> > +++ b/libavfilter/dnn/dnn_backend_tf.c
> > @@ -176,6 +176,7 @@ static int tf_start_inference(void *args)
> >      if (TF_GetCode(request->status) != TF_OK) {
> >          av_log(&tf_model->ctx, AV_LOG_ERROR, "%s",
> > TF_Message(request-
> > >status));
> >          tf_free_request(infer_request);
> > +        av_freep(&request);
> 
> Will request be freed in the queue management code?
> 
> Others in this patch looks fine.
As I checked, the queue management code did not free such variables. But it was free in ff_dnn_free_model_tf function. So, I deleted this line in PATCH V2.
And added an extra code, which also help free mem in 'model' when execute model failed, in line 1130. Hope this make sense to you.
> _______________________________________________
> 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".
_______________________________________________
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".

  reply	other threads:[~2023-03-24  7:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  3:00 [FFmpeg-devel] [PATCH 1/3] lavfi/dnn: fix corruption when TF backend infer failed Ting Fu
2023-03-16  3:00 ` [FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF backend error handle Ting Fu
2023-03-24  3:48   ` Guo, Yejun
2023-03-24  7:54     ` Fu, Ting [this message]
2023-03-16  3:00 ` [FFmpeg-devel] [PATCH 3/3] lavfi/dnn: add error info for TF backend filling task failure Ting Fu
2023-03-24  3:50   ` Guo, Yejun
2023-03-24  3:33 ` [FFmpeg-devel] [PATCH 1/3] lavfi/dnn: fix corruption when TF backend infer failed Guo, Yejun
2023-03-24  7:49   ` Fu, Ting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB31178D44126CD4C7214A4A6BE6849@SN6PR11MB3117.namprd11.prod.outlook.com \
    --to=ting.fu-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git