diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-18 11:56:07 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-08-18 11:56:37 -0700 |
commit | 5155e7c030e5dd0b3b7b24d46c93b9a9d756a748 (patch) | |
tree | 6f4b86bd7b6587bc5a8dc972a1b95f254dab75f2 | |
parent | a2a39436b65f329630df4a93ec4e30aeae403c54 (diff) | |
download | gnulib-5155e7c030e5dd0b3b7b24d46c93b9a9d756a748.tar.gz |
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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/canonicalize-lgpl.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -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 diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index da83da3471..4a38a4610e 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -285,7 +285,7 @@ __realpath (const char *name, char *resolved) buf = malloca (path_max); if (!buf) { - alloc_failed (); + __set_errno (ENOMEM); goto error; } |