1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

url: always clone the CUROPT_CURLU handle

Since a few code paths actually update that data.

Fixes #3753
Closes #3761

Reported-by: Poul T Lomholt
This commit is contained in:
Daniel Stenberg 2019-04-11 12:49:20 +02:00
parent f73de32d46
commit 9a4ad1b056
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -303,7 +303,6 @@ static void up_free(struct Curl_easy *data)
Curl_safefree(up->options);
Curl_safefree(up->path);
Curl_safefree(up->query);
if(data->set.uh != data->state.uh)
curl_url_cleanup(data->state.uh);
data->state.uh = NULL;
}
@ -1879,7 +1878,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
/* parse the URL */
if(data->set.uh) {
uh = data->state.uh = data->set.uh;
uh = data->state.uh = curl_url_dup(data->set.uh);
}
else {
uh = data->state.uh = curl_url();