From f9ea47db3d2e9494321131f789e8e5e9513b26dc Mon Sep 17 00:00:00 2001 From: Pedro Giffuni Date: Fri, 7 Apr 2017 13:36:06 -0700 Subject: [PATCH] OpenZFS 8046 - Let calloc() do the multiplication in libzfs_fru_refresh Authored by: Pedro Giffuni Approved by: Robert Mustacchi Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Ported-by: Giuseppe Di Natale OpenZFS-issue: https://www.illumos.org/issues/8046 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3a3c0d5 Closes #5989 --- lib/libzfs/libzfs_fru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_fru.c b/lib/libzfs/libzfs_fru.c index bb278aa7bf..2ee8bdfb22 100644 --- a/lib/libzfs/libzfs_fru.c +++ b/lib/libzfs/libzfs_fru.c @@ -284,7 +284,7 @@ libzfs_fru_refresh(libzfs_handle_t *hdl) if (hdl->libzfs_fru_hash == NULL && (hdl->libzfs_fru_hash = - calloc(ZFS_FRU_HASH_SIZE * sizeof (void *), 1)) == NULL) + calloc(ZFS_FRU_HASH_SIZE, sizeof (void *))) == NULL) return; /*