diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/process_url.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/process_url.c b/src/process_url.c index 7723d45..8d64cda 100644 --- a/src/process_url.c +++ b/src/process_url.c @@ -275,8 +275,10 @@ bool get_info(const char *URL, long *psize, char **p_content_type, goto end; } DEBUG_PRINT("Set-Cookie: %s\n", pch->value); - *p_cookie = malloc(strlen(pch->value) + 1); - strcpy(*p_cookie, pch->value); + if (p_cookie){ + *p_cookie = malloc(strlen(pch->value) + 1); + strcpy(*p_cookie, pch->value); + } if (psize) { r = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, |