Softc may be NULL in g_journal_orphan(), so don't be surprised.

This commit is contained in:
Pawel Jakub Dawidek 2006-12-02 09:10:29 +00:00
parent dc19f7e892
commit 9cb9930ea6

View file

@ -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);