]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
netrc: Return the correct error code when out of memory
authorSteve Holme <steve_holme@hotmail.com>
Mon, 17 Jun 2019 22:01:49 +0000 (23:01 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Tue, 18 Jun 2019 20:00:43 +0000 (21:00 +0100)
Introduced in 763c5178.

Closes #4036

lib/netrc.c

index 1bd998f9c5f743062f76f2662f73f0c95f817879..f41636e974ad076fff307ad64ff5b2418f41aa20 100644 (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)