Index: geom_subr.c =================================================================== RCS file: /private/FreeBSD/src/sys/geom/geom_subr.c,v retrieving revision 1.75 diff -u -p -r1.75 geom_subr.c --- geom_subr.c 18 Mar 2004 07:17:10 -0000 1.75 +++ geom_subr.c 4 Jun 2004 12:45:26 -0000 @@ -289,7 +289,8 @@ g_wither_geom(struct g_geom *gp, int err cp2 = LIST_NEXT(cp, consumer); if (cp->acr || cp->acw || cp->ace) continue; - g_detach(cp); + if (cp->provider != NULL) + g_detach(cp); g_destroy_consumer(cp); } if (LIST_EMPTY(&gp->provider) && LIST_EMPTY(&gp->consumer))