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);