Skip to content
Snippets Groups Projects
Commit 7c792376 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

free the URL on redirections, this was a previous memory leak

parent e9b69bc7
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment