From: Daniel Stenberg Date: Mon, 15 Aug 2022 14:36:33 +0000 (+0200) Subject: Curl_close: call Curl_resolver_cancel to avoid memory-leak X-Git-Tag: curl-7_85_0~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37dbbbb6c14bcbd696441e15b41cc3d1c74c486c;p=thirdparty%2Fcurl.git Curl_close: call Curl_resolver_cancel to avoid memory-leak There might be a pending (c-ares) resolve that isn't free'd up yet. Closes #9310 --- diff --git a/lib/url.c b/lib/url.c index 359e20a7cd..44c1d3f375 100644 --- a/lib/url.c +++ b/lib/url.c @@ -440,6 +440,7 @@ CURLcode Curl_close(struct Curl_easy **datap) Curl_safefree(data->info.wouldredirect); /* this destroys the channel and we cannot use it anymore after this */ + Curl_resolver_cancel(data); Curl_resolver_cleanup(data->state.async.resolver); Curl_http2_cleanup_dependencies(data);