netrc: Return the correct error code when out of memory

Introduced in 763c5178.

Closes #4036
This commit is contained in:
Steve Holme 2019-06-17 23:01:49 +01:00
parent 7fb54ef89b
commit 6c2f9bea70
No known key found for this signature in database
GPG Key ID: 4059CB85CA7E8F19

View File

@ -89,7 +89,7 @@ int Curl_parsenetrc(const char *host,
&& pw_res) {
home = strdup(pw.pw_dir);
if(!home)
return CURLE_OUT_OF_MEMORY;
return -1;
home_alloc = TRUE;
}
#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)