31 lines
892 B
Diff
31 lines
892 B
Diff
From 37dbbbb6c14bcbd696441e15b41cc3d1c74c486c Mon Sep 17 00:00:00 2001
|
|
From: Daniel Stenberg <daniel@haxx.se>
|
|
Date: Mon, 15 Aug 2022 16:36:33 +0200
|
|
Subject: [PATCH] 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
|
|
|
|
Conflict: NA
|
|
Reference: https://github.com/curl/curl/commit/37dbbbb6c14bcbd696441e15b41cc3d1c74c486c
|
|
---
|
|
lib/url.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/lib/url.c b/lib/url.c
|
|
index 359e20a7c..44c1d3f37 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);
|
|
--
|
|
2.33.0
|
|
|