From 6c2f9bea70b928067b854f0a17981e3da0c65aeb Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Mon, 17 Jun 2019 23:01:49 +0100 Subject: [PATCH] netrc: Return the correct error code when out of memory Introduced in 763c5178. Closes #4036 --- lib/netrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netrc.c b/lib/netrc.c index 1bd998f9c..f41636e97 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -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)