summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWyatt O'Day <wyatt@wyday.com>2019-11-06 17:39:49 -0500
committerJay Satiro <raysatiro@yahoo.com>2019-11-06 23:48:10 -0500
commit93738efe162a1646a98d0c9b649d5cafedabf1ea (patch)
tree63c2b371f90f5aeef28b8c7a31aca2e4ecbc2566
parentbc1cd39a1d7fdd505dcfe6a4582e85631417d126 (diff)
downloadcurl-93738efe162a1646a98d0c9b649d5cafedabf1ea.tar.gz
build: fix for CURL_DISABLE_DOH
Fixes https://github.com/curl/curl/issues/4565 Closes https://github.com/curl/curl/pull/4566
-rw-r--r--lib/url.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 8285474fd..4f4120146 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -403,9 +403,11 @@ CURLcode Curl_close(struct Curl_easy **datap)
Curl_share_unlock(data, CURL_LOCK_DATA_SHARE);
}
+#ifndef CURL_DISABLE_DOH
free(data->req.doh.probe[0].serverdoh.memory);
free(data->req.doh.probe[1].serverdoh.memory);
curl_slist_free_all(data->req.doh.headers);
+#endif
/* destruct wildcard structures if it is needed */
Curl_wildcard_dtor(&data->wildcard);
@@ -1987,8 +1989,11 @@ void Curl_free_request_state(struct Curl_easy *data)
{
Curl_safefree(data->req.protop);
Curl_safefree(data->req.newurl);
+
+#ifndef CURL_DISABLE_DOH
Curl_close(&data->req.doh.probe[0].easy);
Curl_close(&data->req.doh.probe[1].easy);
+#endif
}