[FFmpeg-devel] [PATCH 2/3] lavfi/dnn: fix mem leak in TF backend error handle

Guo, Yejun yejun.guo at intel.com
Fri Mar 24 05:48:49 EET 2023



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Ting
> Fu
> Sent: Thursday, March 16, 2023 11:00 AM
> To: ffmpeg-devel at 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 at 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.


More information about the ffmpeg-devel mailing list