From c257753ee9017a045baae572bde4946fb3c09722 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Jun 2025 11:46:51 +0200 Subject: [PATCH] asyn-thrdd: free the previous name before strdup'ing the new Fixes #17602 Reported-by: hiimmat on github Closes #17604 --- lib/asyn-thrdd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/asyn-thrdd.c b/lib/asyn-thrdd.c index 593ef37175..454e31b8b8 100644 --- a/lib/asyn-thrdd.c +++ b/lib/asyn-thrdd.c @@ -422,6 +422,7 @@ static bool async_thrdd_init(struct Curl_easy *data, data->state.async.done = FALSE; data->state.async.port = port; data->state.async.ip_version = ip_version; + free(data->state.async.hostname); data->state.async.hostname = strdup(hostname); if(!data->state.async.hostname) goto err_exit; -- 2.47.3