svn commit: r210795 - head/sys/geom/sched

Andrey V. Elsukov ae at FreeBSD.org
Tue Aug 3 11:21:18 UTC 2010


Author: ae
Date: Tue Aug  3 11:21:17 2010
New Revision: 210795
URL: http://svn.freebsd.org/changeset/base/210795

Log:
  Check that gsp is not NULL before access. It can be NULL
  for some cases.
  
  Approved by:	kib (mentor)
  MFC after:	1 week

Modified:
  head/sys/geom/sched/g_sched.c

Modified: head/sys/geom/sched/g_sched.c
==============================================================================
--- head/sys/geom/sched/g_sched.c	Tue Aug  3 09:23:53 2010	(r210794)
+++ head/sys/geom/sched/g_sched.c	Tue Aug  3 11:21:17 2010	(r210795)
@@ -1906,7 +1906,7 @@ g_sched_dumpconf(struct sbuf *sb, const 
 	if (indent == NULL) {	/* plaintext */
 		sbuf_printf(sb, " algo %s", gsp ? gsp->gs_name : "--");
 	}
-	if (gsp->gs_dumpconf)
+	if (gsp != NULL && gsp->gs_dumpconf)
 		gsp->gs_dumpconf(sb, indent, gp, cp, pp);
 }
 


More information about the svn-src-all mailing list