]> granicus.if.org Git - curl/commitdiff
url: cleanup dangling DOH request headers too
authorDaniel Stenberg <daniel@haxx.se>
Tue, 17 Sep 2019 21:47:12 +0000 (23:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2019 05:48:49 +0000 (07:48 +0200)
Follow-up to 9bc44ff64d9081

Credit to OSS-Fuzz
Bug: https://crbug.com/oss-fuzz/17269

Closes #4372

lib/url.c

index 94dc9b8b2be04ebdbb5c8744227cbebdda2b4bcf..572cd9c6805db28c002637a713de3596e7397530 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -404,6 +404,7 @@ CURLcode Curl_close(struct Curl_easy *data)
   Curl_close(data->req.doh.probe[1].easy);
   free(data->req.doh.probe[0].serverdoh.memory);
   free(data->req.doh.probe[1].serverdoh.memory);
+  curl_slist_free_all(data->req.doh.headers);
 
   /* destruct wildcard structures if it is needed */
   Curl_wildcard_dtor(&data->wildcard);