mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
free the URL on redirections, this was a previous memory leak
This commit is contained in:
parent
e9b69bc757
commit
7c7923761d
@ -718,6 +718,9 @@ CURLcode curl_transfer(CURL *curl)
|
||||
/* TBD: set the port with curl_setopt() */
|
||||
data->port = 0;
|
||||
}
|
||||
|
||||
if(data->bits.urlstringalloc)
|
||||
free(data->url);
|
||||
|
||||
/* TBD: set the URL with curl_setopt() */
|
||||
data->url = data->newurl;
|
||||
@ -744,12 +747,6 @@ CURLcode curl_transfer(CURL *curl)
|
||||
if(data->newurl)
|
||||
free(data->newurl);
|
||||
|
||||
#if 0
|
||||
if((CURLE_OK == res) && data->writeinfo) {
|
||||
/* Time to output some info to stdout */
|
||||
WriteOut(data);
|
||||
}
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user