diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-04-11 12:49:20 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-04-11 12:50:34 +0200 |
commit | e2caf8069d1bc1e3abc5cbd345c56792c8fb6ad4 (patch) | |
tree | b93d1acfc43f5b26821686bd4f1cd1ff2ce45e16 | |
parent | 06ace0ba98d8d147f20c93fc34aa9a2457530004 (diff) | |
download | curl-e2caf8069d1bc1e3abc5cbd345c56792c8fb6ad4.tar.gz |
url: always clone the CUROPT_CURLU handle
Since a few code paths actually update that data.
Fixes #3753
Reported-by: Poul T Lomholt
-rw-r--r-- | lib/url.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -303,8 +303,7 @@ 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); + 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(); |