asyn-thread: do not allocate thread_data separately

Put the full struct into Curl_async since it will be used for every name
resolve anyway.

Closes #16241
This commit is contained in:
Daniel Stenberg 2025-02-06 16:05:56 +01:00
parent 48f6bfa8c7
commit d9fc64d3ab
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 188 additions and 208 deletions

View file

@ -100,7 +100,7 @@ static void httpsrr_opt(struct Curl_easy *data,
size_t len = 0;
const unsigned char *val = NULL;
unsigned short code;
struct thread_data *res = data->state.async.tdata;
struct thread_data *res = &data->state.async.thdata;
struct Curl_https_rrinfo *hi = &res->hinfo;
code = ares_dns_rr_get_opt(rr, key, idx, &val, &len);
@ -138,7 +138,7 @@ void Curl_dnsrec_done_cb(void *arg, ares_status_t status,
struct Curl_easy *data = arg;
size_t i;
#ifdef CURLRES_ARES
struct thread_data *res = data->state.async.tdata;
struct thread_data *res = &data->state.async.thdata;
res->num_pending--;
#endif