diff --git a/lib/urlapi.c b/lib/urlapi.c index 5a424829c0..c8a7a8c280 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -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; }