Date: Sat, 26 Jan 2019 14:54:07 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343473 - head/sys/geom/uzip Message-ID: <201901261454.x0QEs79G097956@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sat Jan 26 14:54:06 2019 New Revision: 343473 URL: https://svnweb.freebsd.org/changeset/base/343473 Log: geom_uzip(4): move NULL pointer KASSERT check before it is dereferenced PR: 203499 Submitted by: <chadf@triularity.org> MFC after: 5 days Modified: head/sys/geom/uzip/g_uzip.c Modified: head/sys/geom/uzip/g_uzip.c ============================================================================== --- head/sys/geom/uzip/g_uzip.c Sat Jan 26 14:14:25 2019 (r343472) +++ head/sys/geom/uzip/g_uzip.c Sat Jan 26 14:54:06 2019 (r343473) @@ -889,13 +889,13 @@ g_uzip_destroy_geom(struct gctl_req *req, struct g_cla g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, gp->name); g_topology_assert(); + KASSERT(gp != NULL, ("NULL geom")); if (gp->softc == NULL) { DPRINTF(GUZ_DBG_ERR, ("%s(%s): gp->softc == NULL\n", __func__, gp->name)); return (ENXIO); } - KASSERT(gp != NULL, ("NULL geom")); pp = LIST_FIRST(&gp->provider); KASSERT(pp != NULL, ("NULL provider")); if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901261454.x0QEs79G097956>