From 59b45a90cc04695d862d59d1d84126ad6cdf5f59 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 29 Jan 2005 12:01:20 +0000 Subject: [PATCH] multi interface: when a request is denied due to "Maximum redirects followed" libcurl leaked the last Location: URL. --- CHANGES | 3 +++ lib/multi.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index c33f4e709..42317ac85 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,9 @@ Changelog Daniel (29 January 2005) +- multi interface: when a request is denied due to "Maximum redirects + followed" libcurl leaked the last Location: URL. + - Connect failures with the multi interface was often returned as "connect() timed out" even though the reason was different. diff --git a/lib/multi.c b/lib/multi.c index 62bffec45..f569c281a 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -523,6 +523,10 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) easy->state = CURLM_STATE_CONNECT; result = CURLM_CALL_MULTI_PERFORM; } + else + /* Since we "took it", we are in charge of freeing this on + failure */ + free(newurl); } else { easy->state = CURLM_STATE_DONE;