summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2010-08-03 09:10:48 +0000
committerae <ae@FreeBSD.org>2010-08-03 09:10:48 +0000
commit91e7795d2b6a0990736b8b90e13d01a6c2385fd5 (patch)
tree3c65f3a654a0b0c61a58f8e354a62184e06e273b /sys/geom
parent68119726efbb1a840112c285f860033903e136a4 (diff)
downloadFreeBSD-src-91e7795d2b6a0990736b8b90e13d01a6c2385fd5.zip
FreeBSD-src-91e7795d2b6a0990736b8b90e13d01a6c2385fd5.tar.gz
Check that table is not NULL before access, it can be NULL
for some cases. Approved by: mav (mentor) MFC after: 2 weeks
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/part/g_part.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index 2129f39..b9fca08 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -1748,7 +1748,7 @@ g_part_orphan(struct g_consumer *cp)
KASSERT(pp->error != 0, (__func__));
table = cp->geom->softc;
- if (table->gpt_opened)
+ if (table != NULL && table->gpt_opened)
g_access(cp, -1, -1, -1);
g_part_wither(cp->geom, pp->error);
}
OpenPOWER on IntegriCloud