]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
setopt: let CURLOPT_ECH set to NULL reset to default
authorDaniel Stenberg <daniel@haxx.se>
Thu, 22 Aug 2024 11:17:27 +0000 (13:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Aug 2024 06:24:33 +0000 (08:24 +0200)
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

index 9d695e09d3f54e53b72a5f8b6a8bff3228306dea..e8d7ada14e77da2425c001893bbc8ed59a4584fb 100644 (file)
@@ -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) {