From bd4c081157e48e522d94f54d14bf169c2c3e27e3 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Thu, 6 Nov 2003 07:55:45 +0000
Subject: [PATCH] unitialized variable fix, reported by both Marty Kuhrt and
 benjamin gerard

---
 lib/transfer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/transfer.c b/lib/transfer.c
index 4d5ea03bd2..306cb96410 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1854,10 +1854,9 @@ CURLcode Curl_perform(struct SessionHandle *data)
          to the new URL */
       urlchanged = data->change.url_changed;
       if ((CURLE_OK == res) && urlchanged) {
-        char *gotourl;
         res = Curl_done(conn);
         if(CURLE_OK == res) {
-          newurl = strdup(data->change.url);
+          char *gotourl = strdup(data->change.url);
           res = Curl_follow(data, gotourl);
           if(res)
             free(gotourl);
-- 
GitLab