asyn-thread: fix HTTPS RR resolution

Store the received data correctly.

Closes #16107
This commit is contained in:
Dexter Gerig 2025-01-27 22:45:38 -06:00 committed by Daniel Stenberg
parent fd12b56832
commit afb3fd7112
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -64,6 +64,7 @@
#include "inet_ntop.h"
#include "curl_threads.h"
#include "connect.h"
#include "strdup.h"
#ifdef USE_ARES
#include <ares.h>
@ -619,6 +620,17 @@ CURLcode Curl_resolver_is_resolved(struct Curl_easy *data,
destroy_async_data(&data->state.async);
return result;
}
#ifdef USE_HTTPSRR_ARES
{
struct Curl_https_rrinfo *lhrr =
Curl_memdup(&td->hinfo, sizeof(struct Curl_https_rrinfo));
if(!lhrr) {
destroy_async_data(&data->state.async);
return CURLE_OUT_OF_MEMORY;
}
data->state.async.dns->hinfo = lhrr;
}
#endif
destroy_async_data(&data->state.async);
*entry = data->state.async.dns;
}