From: Daniel Stenberg Date: Sun, 21 Oct 2018 21:50:13 +0000 (+0200) Subject: Curl_follow: remove remaining free(newurl) X-Git-Tag: curl-7_62_0~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca10fae6fc0131476b79b293e8d7087455c04ead;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/transfer.c b/lib/transfer.c index deb0ec7864..e6d98cfa49 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 */ } }