avformat/http: fix memory leak in parse_cookie.
authorRichard Shaffer <rshaffer@tunein.com>
Thu, 11 Jan 2018 22:28:52 +0000 (14:28 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 12 Jan 2018 11:31:55 +0000 (12:31 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/http.c

index 4806b1e..510b233 100644 (file)
@@ -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);