Make sure to check that the active provider pointer points to something before

dereferencing the pointer.

Sponsored by:   Pansas
MFC after:	1 week
This commit is contained in:
Matt Jacob 2010-05-14 16:56:18 +00:00
parent 4812aef510
commit 1371a457d9

View File

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