[FFmpeg-devel] [PATCH] avformat/http: fix memleak

Michael Niedermayer michael at niedermayer.cc
Thu Sep 24 12:21:45 EEST 2020


On Thu, Sep 24, 2020 at 11:13:49AM +0800, mypopy at gmail.com wrote:
> On Thu, Sep 24, 2020 at 2:10 AM Zhao Zhili <quinkblack at foxmail.com> wrote:
> >
> > Ping for review.
> >
> > > On Aug 24, 2020, at 12:58 AM, Zhao Zhili <quinkblack at foxmail.com> wrote:
> > >
> > > ---
> > > libavformat/http.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/libavformat/http.c b/libavformat/http.c
> > > index 6c39da1a8b..3d25d652d3 100644
> > > --- a/libavformat/http.c
> > > +++ b/libavformat/http.c
> > > @@ -577,7 +577,7 @@ static int http_open(URLContext *h, const char *uri, int flags,
> > >                    "No trailing CRLF found in HTTP header. Adding it.\n");
> > >             ret = av_reallocp(&s->headers, len + 3);
> > >             if (ret < 0)
> > > -                return ret;
> > > +                goto bail_out;
> > >             s->headers[len]     = '\r';
> > >             s->headers[len + 1] = '\n';
> > >             s->headers[len + 2] = '\0';
> > > @@ -588,6 +588,7 @@ static int http_open(URLContext *h, const char *uri, int flags,
> > >         return http_listen(h, uri, flags, options);
> > >     }
> > >     ret = http_open_cnx(h, options);
> > > +bail_out:
> > >     if (ret < 0)
> > >         av_dict_free(&s->chained_options);
> > >     return ret;
> > > --
> > > 2.25.1
> > >
> >
> LGTM

will apply

thx

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

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk

-------------- 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/20200924/1eed7e83/attachment.sig>


More information about the ffmpeg-devel mailing list