From 830018aa38817547dddfc9e4e706eaad758a579b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Oct 2008 22:01:23 +0000 Subject: - Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing: Any subsequent transfer with a redirect leaks memory, eventually crashing the process potentially. Any subsequent transfer WITHOUT a redirect causes the most recent redirect that DID occur on some previous transfer to still be reported. --- CHANGES | 9 +++++++++ RELEASE-NOTES | 1 + TODO-RELEASE | 10 +++------- lib/transfer.c | 2 ++ tests/data/DISABLED | 3 +-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 99899eae8..9ea7e69ec 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,15 @@ Daniel Fandrich (8 Oct 2008) - Added tests 1082 through 1085 to test symbolic --interface parameters Daniel Stenberg (8 Oct 2008) +- Bug #2152270 (http://curl.haxx.se/bug/view.cgi?id=2152270) identified and + fixed a CURLINFO_REDIRECT_URL memory leak and an additional wrong-doing: + + Any subsequent transfer with a redirect leaks memory, eventually crashing + the process potentially. + + Any subsequent transfer WITHOUT a redirect causes the most recent redirect + that DID occur on some previous transfer to still be reported. + - Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) that eventually identified a flaw in how the multi_socket interface in some cases missed to call the timeout callback when easy interfaces are removed and diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 77beeb5fe..4d8e21ec7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -35,6 +35,7 @@ This release includes the following bugfixes: o FTP SIZE response 550 now causes CURLE_REMOTE_FILE_NOT_FOUND o CURLINFO_PRIMARY_IP fixed for persistent connection re-use cases o remove_handle/add_handle multi interface timer callback flaw + o CURLINFO_REDIRECT_URL memory leak and wrong-doing This release includes the following known bugs: diff --git a/TODO-RELEASE b/TODO-RELEASE index a0118a0a3..7edb5801b 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -13,12 +13,8 @@ Awaiting feedback, updates or removal: 178 - "[Patch] Disable multi API support" -Patches pending commit: - -180 - CURLINFO_REDIRECT_URL leaks memory and is incorrect, bug #2152270 +182 - Make CURLINFO_LASTSOCKET accessible during perform -181 - "multi object is stuck" bug #2111613 - needs to be done slightly nicer - -182 - +Patches pending commit: +183 - diff --git a/lib/transfer.c b/lib/transfer.c index 2f4ce692d..5faec148e 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1893,6 +1893,8 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) data->state.authproblem = FALSE; data->state.authhost.want = data->set.httpauth; data->state.authproxy.want = data->set.proxyauth; + Curl_safefree(data->info.wouldredirect); + data->info.wouldredirect = NULL; /* If there is a list of cookie files to read, do it now! */ if(data->change.cookielist) { diff --git a/tests/data/DISABLED b/tests/data/DISABLED index f917042af..fb3ae0ec9 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -3,5 +3,4 @@ # test cases are run by runtests.pl. Just add the plain test case numbers, one # per line. # Lines starting with '#' letters are treated as comments. -1080 -1081 + -- cgit v1.2.3