aboutsummaryrefslogtreecommitdiff
path: root/libavformat/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 5e1c9abd89..aefc9fa245 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -746,7 +746,7 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
"Content-Type: %s\r\n", s->content_type);
if (!has_header(s->headers, "\r\nCookie: ") && s->cookies) {
char *cookies = NULL;
- if (!get_cookies(s, &cookies, path, hoststr)) {
+ if (!get_cookies(s, &cookies, path, hoststr) && cookies) {
len += av_strlcatf(headers + len, sizeof(headers) - len,
"Cookie: %s\r\n", cookies);
av_free(cookies);