From: Daniel Stenberg Date: Tue, 17 Sep 2019 21:47:12 +0000 (+0200) Subject: url: cleanup dangling DOH request headers too X-Git-Tag: curl-7_67_0~185 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=beb435091793ceebf5e0b7502b17f785c051b3f7;p=thirdparty%2Fcurl.git url: cleanup dangling DOH request headers too Follow-up to 9bc44ff64d9081 Credit to OSS-Fuzz Bug: https://crbug.com/oss-fuzz/17269 Closes #4372 --- diff --git a/lib/url.c b/lib/url.c index 94dc9b8b2b..572cd9c680 100644 --- 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);