aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-11 06:10:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-11 06:10:48 +0000
commitfef1fc0d32455fe4d04250862bce607900c1439e (patch)
tree2dc1a68fc0571b9829aee327f826f6dedd939773 /lib
parentdc6da007ad1d1f5c2ae6caa111400f6f652aba6f (diff)
Ingo Wilken's redirect fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c1
-rw-r--r--lib/url.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 582392148..1dad615f4 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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 */
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);