diff options
author | pjd <pjd@FreeBSD.org> | 2006-12-02 09:10:29 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-12-02 09:10:29 +0000 |
commit | c3fbfd0542cfad5d225a404ae4c1ab987a22aef4 (patch) | |
tree | ef1e782b3d755cff48e9b13555e2b6d78ce1c29b /sys | |
parent | d1bdc7254623ee33c950d1ce461cf1c338499870 (diff) | |
download | FreeBSD-src-c3fbfd0542cfad5d225a404ae4c1ab987a22aef4.zip FreeBSD-src-c3fbfd0542cfad5d225a404ae4c1ab987a22aef4.tar.gz |
Softc may be NULL in g_journal_orphan(), so don't be surprised.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/journal/g_journal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c index 8a39e3f..3edee0a 100644 --- a/sys/geom/journal/g_journal.c +++ b/sys/geom/journal/g_journal.c @@ -390,9 +390,10 @@ g_journal_orphan(struct g_consumer *cp) g_topology_assert(); sc = cp->geom->softc; - GJ_DEBUG(0, "Lost provider %s (journal=%s).", cp->provider->name, - sc->sc_name); - strlcpy(name, sc->sc_name, sizeof(name)); + strlcpy(name, cp->provider->name, sizeof(name)); + GJ_DEBUG(0, "Lost provider %s.", name); + if (sc == NULL) + return; error = g_journal_destroy(sc); if (error == 0) GJ_DEBUG(0, "Journal %s destroyed.", name); |