From 05609bac95709beb387e5273ca33a6054bc89b0b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 22 Aug 2024 13:17:27 +0200 Subject: [PATCH] setopt: let CURLOPT_ECH set to NULL reset to default Because NULL is documented as default and most options that take pointers accept NULL to reset back to internal default. Closes #14634 --- lib/setopt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/setopt.c b/lib/setopt.c index 9d695e09d3..e8d7ada14e 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -3188,8 +3188,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) argptr = va_arg(param, char *); if(!argptr) { data->set.tls_ech = CURLECH_DISABLE; - result = CURLE_BAD_FUNCTION_ARGUMENT; - return result; + return CURLE_OK; } plen = strlen(argptr); if(plen > CURL_MAX_INPUT_LENGTH) {