Commit 7c792376 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

free the URL on redirections, this was a previous memory leak

parent e9b69bc7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -719,6 +719,9 @@ CURLcode curl_transfer(CURL *curl)
          data->port = 0;
        }

        if(data->bits.urlstringalloc)
          free(data->url);
      
        /* TBD: set the URL with curl_setopt() */
        data->url = data->newurl;
        data->newurl = NULL; /* don't show! */
@@ -744,12 +747,6 @@ CURLcode curl_transfer(CURL *curl)
  if(data->newurl)
    free(data->newurl);

#if 0
  if((CURLE_OK == res) && data->writeinfo) {
    /* Time to output some info to stdout */
    WriteOut(data);
  }
#endif
  return res;
}