]> Savannah Git Hosting - gnulib.git/commitdiff
canonicalize-lgpl: fix errno after malloca fails
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Aug 2016 18:56:07 +0000 (11:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 18 Aug 2016 18:56:37 +0000 (11:56 -0700)
This fixes a typo I recently introduced.  Suggested by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00039.html
* lib/canonicalize-lgpl.c (__realpath):
Don't assume malloca sets errno on failure.

ChangeLog
lib/canonicalize-lgpl.c

index ff668a4d6dd2fcb1ce5985bdb124861f6c569c32..bee2cbea51724bf2cabc1b339ee68d653cc49e6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-08-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       canonicalize-lgpl: fix errno after malloca fails
+       This fixes a typo I recently introduced.  Suggested by Bruno Haible in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00039.html
+       * lib/canonicalize-lgpl.c (__realpath):
+       Don't assume malloca sets errno on failure.
+
 2016-08-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        strtod: port errno handling to z/OS
index da83da34718de9b4ce6a6259d304496139cb3879..4a38a4610ed69ba15e2bb3666561c44624200379 100644 (file)
@@ -285,7 +285,7 @@ __realpath (const char *name, char *resolved)
               buf = malloca (path_max);
               if (!buf)
                 {
-                  alloc_failed ();
+                  __set_errno (ENOMEM);
                   goto error;
                 }