From 2f3e7a26bc1b7b43e63aa014018746b6dbb72092 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 1 Feb 2024 09:34:41 +0100 Subject: [PATCH] tool_operate: do not set CURLOPT_QUICK_EXIT in debug builds 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tool_operate.c b/src/tool_operate.c index ba811d7733..86936ba594 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -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); -- 2.47.3