mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
asyn-thrdd: free the previous name before strdup'ing the new
Fixes #17602 Reported-by: hiimmat on github Closes #17604
This commit is contained in:
parent
49a1cfaec2
commit
c257753ee9
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user