MFC r316695, MFV r316693:

8046 Let calloc() do the multiplication in libzfs_fru_refresh

5697e03e6e

https://www.illumos.org/issues/8046

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:	Pedro Giffuni <pfg@freebsd.org>
This commit is contained in:
Pedro F. Giffuni 2017-04-13 15:40:57 +00:00
parent 850f0a9d80
commit aa71edad8b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=316763

View File

@ -282,7 +282,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;
/*