aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 8c23ae998..787bc18be 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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);