From ca10fae6fc0131476b79b293e8d7087455c04ead Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 21 Oct 2018 23:50:13 +0200 Subject: [PATCH] Curl_follow: remove remaining free(newurl) 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/transfer.c b/lib/transfer.c index deb0ec786..e6d98cfa4 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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 */ } }