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

Ingo Wilken's redirect fixes

parent dc6da007
No related branches found
No related tags found
No related merge requests found
......@@ -910,6 +910,7 @@ CURLcode Curl_perform(CURL *curl)
/* TBD: set the URL with curl_setopt() */
data->url = newurl;
newurl = NULL; /* don't free! */
data->bits.urlstringalloc = TRUE; /* the URL is allocated */
......
......@@ -2233,6 +2233,12 @@ CURLcode Curl_done(struct connectdata *conn)
conn->bits.rangestringalloc = FALSE;
}
/* Cleanup possible redirect junk */
if(conn->newurl) {
free(conn->newurl);
conn->newurl = NULL;
}
/* this calls the protocol-specific function pointer previously set */
if(conn->curl_done)
result = conn->curl_done(conn);
......
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