Date: Fri, 02 Oct 2015 03:20:33 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 203499] KASSERT for non-NULL in g_uzip.c after value is dereferenced Message-ID: <bug-203499-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203499 Bug ID: 203499 Summary: KASSERT for non-NULL in g_uzip.c after value is dereferenced Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: chadf@triularity.org Created attachment 161639 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=161639&action=edit Patch to correct error g_uzip_destroy_geom() in g_uzip.c deferences the variable 'gp' before the KASSERT(gp != NULL) is called. The assertion should be moved up. if (gp->softc == NULL) { DPRINTF(("%s(%s): gp->softc == NULL\n", __func__, gp->name)); return (ENXIO); } KASSERT(gp != NULL, ("NULL geom")); -->> KASSERT(gp != NULL, ("NULL geom")); if (gp->softc == NULL) { DPRINTF(("%s(%s): gp->softc == NULL\n", __func__, gp->name)); return (ENXIO); } Patch included. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203499-8>