[FFmpeg-devel] [PATCH] libavformat/http: Fix memory leak in get_cookies.
nfxjfg at googlemail.com
Tue Apr 17 23:04:28 EEST 2018
On Tue, 17 Apr 2018 10:48:16 -0700
Richard Shaffer <rshaffer at tunein.com> wrote:
> On Fri, Apr 13, 2018 at 4:42 PM, <rshaffer at tunein.com> wrote:
> > From: Richard Shaffer <rshaffer at tunein.com>
> > ---
> > libavformat/http.c | 1 +
> > 1 file changed, 1 insertion(+)
> > diff --git a/libavformat/http.c b/libavformat/http.c
> > index 983034f083..b4a1919f24 100644
> > --- a/libavformat/http.c
> > +++ b/libavformat/http.c
> > @@ -1103,6 +1103,7 @@ static int get_cookies(HTTPContext *s, char
> > **cookies, const char *path,
> > snprintf(*cookies, str_size, "%s; %s=%s", tmp,
> > cookie_entry->key, cookie_entry->value);
> > av_free(tmp);
> > }
> > + av_dict_free(&cookie_params);
> > }
> > av_free(set_cookies);
> > --
> > 2.15.1 (Apple Git-101)
> > Would one of the maintainers mind looking at and applying this? It's a
> one-line change to fix a memory leak.
Not a maintainer, but the "official" maintainer hasn't cared about this
code for a long time (despite being active FFmpeg contributor). Pushed.
I think there are some more leaks of this allocation, though.
More information about the ffmpeg-devel