Date: Fri, 14 May 2010 16:56:18 +0000 (UTC) From: Matt Jacob <mjacob@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r208082 - head/sys/geom/multipath Message-ID: <201005141656.o4EGuIjM014703@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjacob Date: Fri May 14 16:56:18 2010 New Revision: 208082 URL: http://svn.freebsd.org/changeset/base/208082 Log: Make sure to check that the active provider pointer points to something before dereferencing the pointer. Sponsored by: Pansas MFC after: 1 week Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Fri May 14 16:55:13 2010 (r208081) +++ head/sys/geom/multipath/g_multipath.c Fri May 14 16:56:18 2010 (r208082) @@ -757,7 +757,7 @@ g_multipath_ctl_getactive(struct gctl_re 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005141656.o4EGuIjM014703>