altsvc: make it one malloc instead of three per entry

Also return OOM correctly.

Closes #19857
This commit is contained in:
Daniel Stenberg 2025-12-06 18:01:09 +01:00
parent 1c0822e8cb
commit 0b5ece553c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 21 additions and 28 deletions

View file

@ -2532,7 +2532,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
if(result)
return result;
if(ptr)
(void)Curl_altsvc_load(data->asi, ptr);
return Curl_altsvc_load(data->asi, ptr);
break;
#endif /* ! CURL_DISABLE_ALTSVC */
#ifdef USE_ECH