transfer: clear 'referer' in declaration

To silence (false positive) compiler warnings about it.

Follow-up to 7214288898

Reviewed-by: Marcel Raad
Closes #6810
This commit is contained in:
Daniel Stenberg 2021-03-29 09:32:14 +02:00
parent d6fba0ca06
commit 6bb028dbda
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 2 deletions

View File

@ -1582,7 +1582,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
if(data->set.http_auto_referer) {
CURLU *u;
char *referer;
char *referer = NULL;
/* We are asked to automatically set the previous URL as the referer
when we get the next URL. We pick the ->url field, which may or may
@ -1610,7 +1610,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
curl_url_cleanup(u);
if(uc || referer == NULL)
if(uc || !referer)
return CURLE_OUT_OF_MEMORY;
data->state.referer = referer;