Skip to content

Commit 6ffd5ce

Browse files
committed
try patch 1
-- curl version=[8.17.1-DEV] -- The C compiler identification is GNU 14.2.0 /home/runner/work/curl-for-win/curl-for-win/curl/lib/conncache.c: In function 'Curl_cpool_conn_now_idle': /home/runner/work/curl-for-win/curl-for-win/curl/lib/conncache.c:539:11: error: null pointer dereference [-Werror=null-dereference] 539 | if(!data->multi->maxconnects) { | ~~~~^~~~~~~ cc1: all warnings being treated as errors https://github.com/curl/curl-for-win/actions/runs/19111497271/job/54609512969#step:3:5788 -- The C compiler identification is GNU 14.3.0 https://github.com/curl/curl-for-win/actions/runs/19111497271/job/54609512899#step:3:5801
1 parent aa49c56 commit 6ffd5ce

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

curl.dev.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,17 @@ index 975ef2a458..5d71f1bd08 100644
5151
return config;
5252
}
5353

54+
diff --git a/lib/conncache.c b/lib/conncache.c
55+
index d5770ef916..7dc21d967a 100644
56+
--- a/lib/conncache.c
57+
+++ b/lib/conncache.c
58+
@@ -536,6 +536,9 @@ bool Curl_cpool_conn_now_idle(struct Curl_easy *data,
59+
struct cpool *cpool = cpool_get_instance(data);
60+
bool kept = TRUE;
61+
62+
+ if(!data)
63+
+ return kept;
64+
+
65+
if(!data->multi->maxconnects) {
66+
unsigned int running = Curl_multi_xfers_running(data->multi);
67+
maxconnects = (running <= UINT_MAX / 4) ? running * 4 : UINT_MAX;

0 commit comments

Comments
 (0)