diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-05-11 06:10:48 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-05-11 06:10:48 +0000 |
commit | fef1fc0d32455fe4d04250862bce607900c1439e (patch) | |
tree | 2dc1a68fc0571b9829aee327f826f6dedd939773 /lib | |
parent | dc6da007ad1d1f5c2ae6caa111400f6f652aba6f (diff) |
Ingo Wilken's redirect fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 1 | ||||
-rw-r--r-- | lib/url.c | 6 |
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 */ @@ -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); |