diff options
author | Ruediger Meier | 2016-02-17 20:58:23 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-02-18 16:54:26 +0100 |
commit | 9d3d66dfaa975a119b1754a0269422566f200d87 (patch) | |
tree | 40650f95295a3507f57dfa84b767383097cf276c /sys-utils/lsns.c | |
parent | include: remove unused mntent.h (diff) | |
download | kernel-qcow2-util-linux-9d3d66dfaa975a119b1754a0269422566f200d87.tar.gz kernel-qcow2-util-linux-9d3d66dfaa975a119b1754a0269422566f200d87.tar.xz kernel-qcow2-util-linux-9d3d66dfaa975a119b1754a0269422566f200d87.zip |
lsns: use xcalloc()
... found by tools/checkxalloc.sh
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'sys-utils/lsns.c')
-rw-r--r-- | sys-utils/lsns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index 7b8f17d55..71ae3f99e 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -233,7 +233,7 @@ static int read_process(struct lsns *ls, pid_t pid) if (!dir) return -errno; - p = calloc(1, sizeof(*p)); + p = xcalloc(1, sizeof(*p)); if (!p) { rc = -ENOMEM; goto done; @@ -338,7 +338,7 @@ static int namespace_has_process(struct lsns_namespace *ns, pid_t pid) static struct lsns_namespace *add_namespace(struct lsns *ls, int type, ino_t ino) { - struct lsns_namespace *ns = calloc(1, sizeof(*ns)); + struct lsns_namespace *ns = xcalloc(1, sizeof(*ns)); if (!ns) return NULL; |