[FFmpeg-devel] [PATCH 1/6] avfilter/vf_tiltandshift: Free dst on error

Michael Niedermayer michael at niedermayer.cc
Fri Jul 12 22:59:32 EEST 2024


On Fri, Jul 12, 2024 at 12:19:29AM +0200, Vittorio Giovara wrote:
> On Thu, Jul 11, 2024 at 12:50 AM Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > Fixes: CID1559901 Resource leak
> >
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael at 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

will apply

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240712/ba06bd49/attachment.sig>


More information about the ffmpeg-devel mailing list