On Thu, Jul 11, 2024 at 12:50 AM Michael Niedermayer <mich...@niedermayer.cc>
wrote:

> Fixes: CID1559901 Resource leak
>
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
> ---
>  libavfilter/vf_tiltandshift.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c
> index b49a713339d..08bcb062473 100644
> --- a/libavfilter/vf_tiltandshift.c
> +++ b/libavfilter/vf_tiltandshift.c
> @@ -237,8 +237,10 @@ static int output_frame(AVFilterLink *outlink)
>
>      // set correct timestamps and props as long as there is proper input
>      ret = av_frame_copy_props(dst, s->input);
> -    if (ret < 0)
> +    if (ret < 0) {
> +        av_frame_free(&dst);
>          return ret;
> +    }
>
>      // discard frame at the top of the list since it has been fully
> processed
>      list_remove_head(s);
> --
>

lgtm
-- 
Vittorio
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to