From b0cd47b6029de92b06b4f70ec78b0e05f4ea7b8e Mon Sep 17 00:00:00 2001 From: trasz Date: Sat, 5 Jun 2010 08:00:52 +0000 Subject: Make sure not to pass NULL to g_orphan_provider(). Found with: Coverity Prevent CID: 3411 --- sys/geom/mountver/g_mountver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/geom/mountver/g_mountver.c b/sys/geom/mountver/g_mountver.c index e15ce9d..bf2e8a6 100644 --- a/sys/geom/mountver/g_mountver.c +++ b/sys/geom/mountver/g_mountver.c @@ -343,7 +343,8 @@ g_mountver_destroy(struct g_geom *gp, boolean_t force) } else { G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); } - g_orphan_provider(pp, ENXIO); + if (pp != NULL) + g_orphan_provider(pp, ENXIO); g_mountver_discard_queued(gp); g_free(sc->sc_provider_name); g_free(gp->softc); -- cgit v1.1