aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 1f2c6886f..48706c544 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -955,7 +955,7 @@ CURLcode Curl_perform(CURL *curl)
} while(1); /* loop if Location: */
- if(conn->newurl) {
+ if((CURLE_OK == res) && conn->newurl) {
free(conn->newurl);
conn->newurl = NULL;
}