1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-02 12:20:51 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164821

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