]> granicus.if.org Git - curl/commitdiff
Curl_follow: remove remaining free(newurl)
authorDaniel Stenberg <daniel@haxx.se>
Sun, 21 Oct 2018 21:50:13 +0000 (23:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 23 Oct 2018 09:43:41 +0000 (11:43 +0200)
Follow-up to 05564e750e8f0c. This function no longer frees the passed-in
URL.

Reported-by: Michael Kaufmann
Bug: https://github.com/curl/curl/commit/05564e750e8f0c79016c680f301ce251e6e86155#commitcomm
ent-30985666

lib/transfer.c

index deb0ec7864bb198fea5e3bf3bfe82be3ac791ed0..e6d98cfa495406ffd390cae64a5ddd1824dbf1aa 100644 (file)
@@ -1502,10 +1502,8 @@ CURLcode Curl_follow(struct Curl_easy *data,
         }
 
         data->change.referer = strdup(data->change.url);
-        if(!data->change.referer) {
-          free(newurl);
+        if(!data->change.referer)
           return CURLE_OUT_OF_MEMORY;
-        }
         data->change.referer_alloc = TRUE; /* yes, free this later */
       }
     }