diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-21 23:31:19 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-21 23:31:19 +0100 |
commit | b97a60f5f4d3fb63002bc76fcbc6cdeb4572189e (patch) | |
tree | bc71e1c564ede3ff0c36c0b0702a4a7249bd709e /lib/doh.c | |
parent | 5a19cb5a3c1b0345306bb3738a0cdf43ea72852b (diff) | |
download | curl-b97a60f5f4d3fb63002bc76fcbc6cdeb4572189e.tar.gz |
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 6246a1d8c6776
Diffstat (limited to 'lib/doh.c')
-rw-r--r-- | lib/doh.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |