urlapi: return OOM correctly from parse_hostname_login()

Closes #20100
This commit is contained in:
Daniel Stenberg 2025-12-26 13:05:20 +01:00
parent 0ccd16d29a
commit 0e054134b7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -368,7 +368,8 @@ static CURLUcode parse_hostname_login(struct Curl_URL *u,
(h && (h->flags & PROTOPT_URLOPTIONS)) ?
&optionsp : NULL);
if(ccode) {
result = CURLUE_BAD_LOGIN;
result = (ccode == CURLE_OUT_OF_MEMORY) ? CURLUE_OUT_OF_MEMORY :
CURLUE_BAD_LOGIN;
goto out;
}