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. --- lib/transfer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') 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) { -- cgit v1.2.3