From 9bd042a92ecc954c31ca90232a43e484f1be5238 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Sun, 27 Sep 2020 00:04:10 +0900 Subject: [PATCH] sbin/hammer2: Fix calloc element size in get_hammer2_mounts() --- sbin/hammer2/subs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/hammer2/subs.c b/sbin/hammer2/subs.c index ea2cd492c0..b152eb5391 100644 --- a/sbin/hammer2/subs.c +++ b/sbin/hammer2/subs.c @@ -323,7 +323,7 @@ get_hammer2_mounts(int *acp) again: n = getfsstat(NULL, 0, MNT_NOWAIT); av = calloc(n, sizeof(char *)); - fs = calloc(n, sizeof(struct statfs *)); + fs = calloc(n, sizeof(struct statfs)); if (getfsstat(fs, sizeof(*fs) * n, MNT_NOWAIT) != n) { free(av); free(fs); -- 2.41.0