]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: do not set CURLOPT_QUICK_EXIT in debug builds
authorDaniel Stenberg <daniel@haxx.se>
Thu, 1 Feb 2024 08:34:41 +0000 (09:34 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 1 Feb 2024 10:43:47 +0000 (11:43 +0100)
Since it allows (small) memory leaks that interfere with torture tests
and regular memory-leak checks.

Reported-by: Dan Fandrich
Fixes #12834
Closes #12835

src/tool_operate.c

index ba811d77331483c2b7c70d1bdb105e401c77ddd3..86936ba5943935fd0d4a4f1b5f86d3a468440302 100644 (file)
@@ -1274,6 +1274,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
         if(result && (use_proto == proto_ipfs || use_proto == proto_ipns))
           break;
 
+#ifndef DEBUGBUILD
         /* On most modern OSes, exiting works thoroughly,
            we'll clean everything up via exit(), so don't bother with
            slow cleanups. Crappy ones might need to skip this.
@@ -1282,6 +1283,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
         result = curl_easy_setopt(curl, CURLOPT_QUICK_EXIT, 1L);
         if(result)
           break;
+#endif
 
         if(!config->tcp_nodelay)
           my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);