summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-05-09 08:31:11 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-05-09 09:47:30 +0200
commitf7170a8f2ed4dc5a4cfb3ef3c002d218c4bcecad (patch)
tree25760577dd16916f5364cab08d71a4df33eee7e3
parent6708498588729d7e446878297f9ff6f341970a38 (diff)
downloadcurl-f7170a8f2ed4dc5a4cfb3ef3c002d218c4bcecad.tar.gz
http: free the url before storing a new copy
To avoid a memory-leak. Reported-by: Hiroki Kurosawa Closes #11093
-rw-r--r--lib/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http.c b/lib/http.c
index bffdd3468..15cf22c5e 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -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;