diff options
author | Davidlohr Bueso <dave@gnu.org> | 2010-10-15 11:59:18 -0300 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-10-21 10:31:50 +0200 |
commit | 87f3feac713c7aa652bb1d7e4e231ed06a960f4c (patch) | |
tree | 08a67efb1983277b4e32919d30235953dd4f9431 /misc-utils/namei.c | |
parent | d7df7ba2646fae6e9a7e083fb693eb35b702008c (diff) | |
download | util-linux-old-87f3feac713c7aa652bb1d7e4e231ed06a960f4c.tar.gz |
misc-utils: use new xmalloc() wrapper
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Diffstat (limited to 'misc-utils/namei.c')
-rw-r--r-- | misc-utils/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc-utils/namei.c b/misc-utils/namei.c index 9873cda9..0342a08c 100644 --- a/misc-utils/namei.c +++ b/misc-utils/namei.c @@ -19,6 +19,7 @@ * Arkadiusz Mikiewicz (1999-02-22) * Li Zefan (2007-09-10). */ + #include <stdio.h> #include <unistd.h> #include <getopt.h> @@ -34,6 +35,7 @@ #include <grp.h> #include "c.h" +#include "xalloc.h" #include "nls.h" #include "widechar.h" @@ -194,9 +196,7 @@ readlink_to_namei(struct namei *nm, const char *path) if (nm->relstart) sz += nm->relstart + 1; } - nm->abslink = malloc(sz + 1); - if (!nm->abslink) - err(EXIT_FAILURE, _("out of memory?")); + nm->abslink = xmalloc(sz + 1); if (*sym != '/' && nm->relstart) { /* create the absolute path from the relative symlink */ |