1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

doh: make Curl_doh_is_resolved survive a NULL pointer

... if Curl_doh() returned a NULL, this function gets called anyway as
in a asynch procedure. Then the doh struct pointer is NULL and signifies
an OOM situation.

Follow-up to 6246a1d8c6
This commit is contained in:
Daniel Stenberg 2021-01-21 23:31:19 +01:00
parent 5a19cb5a3c
commit b97a60f5f4
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -918,6 +918,8 @@ CURLcode Curl_doh_is_resolved(struct connectdata *conn,
struct Curl_easy *data = conn->data;
struct dohdata *dohp = data->req.doh;
*dnsp = NULL; /* defaults to no response */
if(!dohp)
return CURLE_OUT_OF_MEMORY;
if(!dohp->probe[DOH_PROBE_SLOT_IPADDR_V4].easy &&
!dohp->probe[DOH_PROBE_SLOT_IPADDR_V6].easy) {