From: Paul Eggert Date: Thu, 18 Aug 2016 18:56:07 +0000 (-0700) Subject: canonicalize-lgpl: fix errno after malloca fails X-Git-Tag: v1.0~6679 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5155e7c030e5dd0b3b7b24d46c93b9a9d756a748;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index ff668a4d6d..bee2cbea51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-08-18 Paul Eggert + + 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 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; }