X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fhttp.c;h=0700eac81553bc83b53b8343cd396a7dac21d39e;hb=6d1e9d993a5559ca5c4a578fce499c74528fe8d1;hp=903cf4a108c790f8506d81caa1df378894aceb4e;hpb=9ea65c65f70029896b1c23afd9925ae42c4d009f;p=ffmpeg diff --git a/libavformat/http.c b/libavformat/http.c index 903cf4a108c..0700eac8155 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -406,8 +406,10 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, while ((param = av_strtok(cookie, "; ", &next_param))) { cookie = NULL; if (!av_strncasecmp("path=", param, 5)) { + av_free(cpath); cpath = av_strdup(¶m[5]); } else if (!av_strncasecmp("domain=", param, 7)) { + av_free(cdomain); cdomain = av_strdup(¶m[7]); } else if (!av_strncasecmp("secure", param, 6) || !av_strncasecmp("comment", param, 7) || @@ -415,6 +417,7 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path, !av_strncasecmp("version", param, 7)) { // ignore Comment, Max-Age, Secure and Version } else { + av_free(cvalue); cvalue = av_strdup(param); } }