From owner-svn-src-stable@freebsd.org Thu Apr 13 15:40:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E965D3C451; Thu, 13 Apr 2017 15:40:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B050D9C; Thu, 13 Apr 2017 15:40:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DFevKB001930; Thu, 13 Apr 2017 15:40:57 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFev8b001929; Thu, 13 Apr 2017 15:40:57 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201704131540.v3DFev8b001929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 13 Apr 2017 15:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316763 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:40:58 -0000 Author: pfg Date: Thu Apr 13 15:40:57 2017 New Revision: 316763 URL: https://svnweb.freebsd.org/changeset/base/316763 Log: MFC r316695, 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 Reviewed by: Paul Dagnelie Approved by: Robert Mustacchi Author: Pedro Giffuni Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Thu Apr 13 15:39:42 2017 (r316762) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_fru.c Thu Apr 13 15:40:57 2017 (r316763) @@ -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; /*