diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/gate/g_gate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 7282ac9..d1ddd40 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -398,7 +398,9 @@ g_gate_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, sc = gp->softc; if (sc == NULL || pp != NULL || cp != NULL) return; - g_gate_hold(sc->sc_unit, NULL); + sc = g_gate_hold(sc->sc_unit, NULL); + if (sc == NULL) + return; if ((sc->sc_flags & G_GATE_FLAG_READONLY) != 0) { sbuf_printf(sb, "%s<access>%s</access>\n", indent, "read-only"); } else if ((sc->sc_flags & G_GATE_FLAG_WRITEONLY) != 0) { |