From: Steve Holme Date: Mon, 17 Jun 2019 22:01:49 +0000 (+0100) Subject: netrc: Return the correct error code when out of memory X-Git-Tag: curl-7_65_2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c2f9bea70b928067b854f0a17981e3da0c65aeb;p=thirdparty%2Fcurl.git netrc: Return the correct error code when out of memory Introduced in 763c5178. Closes #4036 --- diff --git a/lib/netrc.c b/lib/netrc.c index 1bd998f9c5..f41636e974 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)