Commit e5e2fb82 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Dan Becker fixed a minor memory leak on persistent connnections using

FOLLOWLOCATION and CURLOPT_USERPWD.
parent 0210b3c8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -440,6 +440,10 @@ CURLcode Curl_http_connect(struct connectdata *conn)
  if(conn->bits.user_passwd && !data->state.this_is_a_follow) {
    /* Authorization: is requested, this is not a followed location, get the
       original host name */
    if (data->state.auth_host)
      /* Free to avoid leaking memory on multiple requests*/
      free(data->state.auth_host);

    data->state.auth_host = strdup(conn->hostname);
  }