Make sure not to pass NULL to g_orphan_provider().

Found with:	Coverity Prevent
CID:		3411
This commit is contained in:
Edward Tomasz Napierala 2010-06-05 08:00:52 +00:00
parent eec80038e3
commit c01eb2f36b

View File

@ -343,7 +343,8 @@ g_mountver_destroy(struct g_geom *gp, boolean_t force)
} else { } else {
G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); 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_mountver_discard_queued(gp);
g_free(sc->sc_provider_name); g_free(sc->sc_provider_name);
g_free(gp->softc); g_free(gp->softc);