mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
OpenZFS 8046 - Let calloc() do the multiplication in libzfs_fru_refresh
Authored by: Pedro Giffuni <pfg@freebsd.org> Approved by: Robert Mustacchi <rm@joyent.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/8046 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3a3c0d5 Closes #5989
This commit is contained in:
parent
c0c8cc7b43
commit
f9ea47db3d
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user