mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
http: free the url before storing a new copy
To avoid a memory-leak. Reported-by: Hiroki Kurosawa Closes #11093
This commit is contained in:
parent
6708498588
commit
f7170a8f2e
@ -1010,7 +1010,7 @@ CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
|
||||
if(authp->picked == CURLAUTH_NEGOTIATE) {
|
||||
CURLcode result = Curl_input_negotiate(data, conn, proxy, auth);
|
||||
if(!result) {
|
||||
DEBUGASSERT(!data->req.newurl);
|
||||
free(data->req.newurl);
|
||||
data->req.newurl = strdup(data->state.url);
|
||||
if(!data->req.newurl)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
Loading…
Reference in New Issue
Block a user