diff mbox

[FFmpeg-devel,3/3] http: fix memory leak in parse_cookie.

Message ID 20180111222852.62678-1-rshaffer@tunein.com
State Accepted
Commit 9147c0975533c83564b1ba47f22952b291b80282
Headers show

Commit Message

rshaffer@tunein.com Jan. 11, 2018, 10:28 p.m. UTC
From: Richard Shaffer <rshaffer@tunein.com>

This is my first time contributing. The problem and the solution seem pretty straightforward, but if I'm missing something, please do point me in the right direction.

Thanks,

-Richard

---
 libavformat/http.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Moritz Barsnick Jan. 11, 2018, 10:49 p.m. UTC | #1
On Thu, Jan 11, 2018 at 14:28:52 -0800, rshaffer@tunein.com wrote:

> [PATCH 3/3] http: fix memory leak in parse_cookie.g

> This is my first time contributing.

Where are the other two of the three ("3/3") patches then? (Not
important, but it's confusing on the mailing list.)

> The problem and the solution seem pretty straightforward, but if I'm missing something, please do point me in the right direction.

I believe the way you submitted this, this text would be part of your
commit message. If you desire to type it into the email, please put it
below the three dashes:

> ---
>  libavformat/http.c | 1 +
>  1 file changed, 1 insertion(+)

I can't comment on the actual change.

Cheers,
Moritz
rshaffer@tunein.com Jan. 11, 2018, 11:15 p.m. UTC | #2
On Thu, Jan 11, 2018 at 2:49 PM, Moritz Barsnick <barsnick@gmx.net> wrote:

> On Thu, Jan 11, 2018 at 14:28:52 -0800, rshaffer@tunein.com wrote:
>
> > [PATCH 3/3] http: fix memory leak in parse_cookie.g
>
> > This is my first time contributing.
>
> Where are the other two of the three ("3/3") patches then? (Not
> important, but it's confusing on the mailing list.)
>

I apologize for the 3/3 in the subject. Patches 1 and 2 deal with something
else, and I'll submit those for review later.


> > The problem and the solution seem pretty straightforward, but if I'm
> missing something, please do point me in the right direction.
>
> I believe the way you submitted this, this text would be part of your
> commit message. If you desire to type it into the email, please put it
> below the three dashes:


Good to know. If someone is willing to review the substance of the patch,
hopefully they'll remove my introduction before committing.

> ---
> >  libavformat/http.c | 1 +
> >  1 file changed, 1 insertion(+)
>
> I can't comment on the actual change.
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Michael Niedermayer Jan. 12, 2018, 11:34 a.m. UTC | #3
On Thu, Jan 11, 2018 at 03:15:41PM -0800, Richard Shaffer wrote:
> On Thu, Jan 11, 2018 at 2:49 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
> 
> > On Thu, Jan 11, 2018 at 14:28:52 -0800, rshaffer@tunein.com wrote:
> >
> > > [PATCH 3/3] http: fix memory leak in parse_cookie.g
> >
> > > This is my first time contributing.
> >
> > Where are the other two of the three ("3/3") patches then? (Not
> > important, but it's confusing on the mailing list.)
> >
> 
> I apologize for the 3/3 in the subject. Patches 1 and 2 deal with something
> else, and I'll submit those for review later.
> 
> 
> > > The problem and the solution seem pretty straightforward, but if I'm
> > missing something, please do point me in the right direction.
> >
> > I believe the way you submitted this, this text would be part of your
> > commit message. If you desire to type it into the email, please put it
> > below the three dashes:
> 
> 
> Good to know. If someone is willing to review the substance of the patch,
> hopefully they'll remove my introduction before committing.

will apply with the commit messages fixed

thx

[...]
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index 4806b1e59b..510b23375a 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -824,6 +824,7 @@  static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies)
             }
         }
     }
+    av_dict_free(&new_params);
 
     // duplicate the cookie name (dict will dupe the value)
     if (!(eql = strchr(p, '='))) return AVERROR(EINVAL);