Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2017 22:56:38 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316695 - head/cddl/contrib/opensolaris/lib/libzfs/common
Message-ID:  <201704102256.v3AMucPC091689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Mon Apr 10 22:56:38 2017
New Revision: 316695
URL: https://svnweb.freebsd.org/changeset/base/316695

Log:
  MFV r316693:
  8046 Let calloc() do the multiplication in libzfs_fru_refresh
  
  https://github.com/illumos/illumos-gate/commit/5697e03e6e3e2697f56ae341c7c8ce79680d6a2e
  
  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>
  
  MFC after:	3 days

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c	Mon Apr 10 22:47:18 2017	(r316694)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c	Mon Apr 10 22:56:38 2017	(r316695)
@@ -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;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704102256.v3AMucPC091689>