mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
doh: fix memory-leak when doing a second DoH resolve
Reported-by: James Fuller Closes #20929
This commit is contained in:
parent
f50446f6da
commit
32531f20f9
1 changed files with 1 additions and 0 deletions
|
|
@ -448,6 +448,7 @@ CURLcode Curl_doh(struct Curl_easy *data, const char *hostname,
|
|||
data->state.async.done = FALSE;
|
||||
data->state.async.port = port;
|
||||
data->state.async.ip_version = ip_version;
|
||||
curlx_free(data->state.async.hostname);
|
||||
data->state.async.hostname = curlx_strdup(hostname);
|
||||
if(!data->state.async.hostname)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue