diff options
-rw-r--r-- | sys/geom/geom_disk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index e0f2bc1..7706517 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -502,6 +502,14 @@ g_disk_providergone(struct g_provider *pp) struct g_disk_softc *sc; sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + dp = sc->dp; if (dp->d_gone != NULL) |