From owner-svn-src-head@freebsd.org Wed Jul 26 21:59:38 2017 Return-Path: Delivered-To: svn-src-head@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 481A6DB19A7; Wed, 26 Jul 2017 21:59:38 +0000 (UTC) (envelope-from marius@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 179387CDA1; Wed, 26 Jul 2017 21:59:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QLxbOF008682; Wed, 26 Jul 2017 21:59:37 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6QLxb6F008681; Wed, 26 Jul 2017 21:59:37 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201707262159.v6QLxb6F008681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 26 Jul 2017 21:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321588 - head/sys/dev/mmc X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/mmc X-SVN-Commit-Revision: 321588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 21:59:38 -0000 Author: marius Date: Wed Jul 26 21:59:37 2017 New Revision: 321588 URL: https://svnweb.freebsd.org/changeset/base/321588 Log: Correctly use the size of a pointer rather than that of a pointer to a pointer. Reported by: Coverity CID: 1378432 Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Wed Jul 26 21:23:09 2017 (r321587) +++ head/sys/dev/mmc/mmc.c Wed Jul 26 21:59:37 2017 (r321588) @@ -1892,7 +1892,7 @@ child_common: if (child != NULL) { device_set_ivars(child, ivar); sc->child_list = realloc(sc->child_list, - sizeof(device_t *) * sc->child_count + 1, + sizeof(device_t) * sc->child_count + 1, M_DEVBUF, M_WAITOK); sc->child_list[sc->child_count++] = child; } else @@ -1934,7 +1934,7 @@ mmc_update_child_list(struct mmc_softc *sc) if (i != j) sc->child_list[i] = child; } - sc->child_list = realloc(sc->child_list, sizeof(device_t *) * + sc->child_list = realloc(sc->child_list, sizeof(device_t) * sc->child_count, M_DEVBUF, M_WAITOK); }