diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-05-14 16:56:18 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-05-14 16:56:18 +0000 |
commit | 9d307c8df9b58bb67def59bf735199736702e253 (patch) | |
tree | d6e725662bdba068fcf3a0dbbc70690035254fb8 | |
parent | ac29b333540045aa780c872b1e387785ff5d481c (diff) | |
download | FreeBSD-src-9d307c8df9b58bb67def59bf735199736702e253.zip FreeBSD-src-9d307c8df9b58bb67def59bf735199736702e253.tar.gz |
Make sure to check that the active provider pointer points to something before
dereferencing the pointer.
Sponsored by: Pansas
MFC after: 1 week
-rw-r--r-- | sys/geom/multipath/g_multipath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 7e145dc..3d1740d 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -757,7 +757,7 @@ g_multipath_ctl_getactive(struct gctl_req *req, struct g_class *mp) return; } sc = gp->softc; - if (sc->cp_active) { + if (sc->cp_active && sc->cp_active->provider) { sbuf_printf(sb, "%s\n", sc->cp_active->provider->name); } else { sbuf_printf(sb, "none\n"); |