summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2010-08-03 11:21:17 +0000
committerae <ae@FreeBSD.org>2010-08-03 11:21:17 +0000
commit195997ebf0c80e9827edd0bed33d7804a271fd94 (patch)
tree8718cff555124c6b769f8ee0a14c8629e7628dbc /sys/geom
parent94897ca080ad1d487b67cb2a1094555bcd87c809 (diff)
downloadFreeBSD-src-195997ebf0c80e9827edd0bed33d7804a271fd94.zip
FreeBSD-src-195997ebf0c80e9827edd0bed33d7804a271fd94.tar.gz
Check that gsp is not NULL before access. It can be NULL
for some cases. Approved by: kib (mentor) MFC after: 1 week
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/sched/g_sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/sched/g_sched.c b/sys/geom/sched/g_sched.c
index f3b2665..39c866b 100644
--- a/sys/geom/sched/g_sched.c
+++ b/sys/geom/sched/g_sched.c
@@ -1906,7 +1906,7 @@ g_sched_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp,
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);
}
OpenPOWER on IntegriCloud