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.
This commit is contained in:
Daniel Stenberg 2008-10-08 22:01:23 +00:00
parent 8dfddd279b
commit 830018aa38
5 changed files with 16 additions and 9 deletions

View file

@ -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) {