svn commit: r210792 - head/sys/geom/part
Andrey V. Elsukov
ae at FreeBSD.org
Tue Aug 3 09:10:49 UTC 2010
Author: ae
Date: Tue Aug 3 09:10:48 2010
New Revision: 210792
URL: http://svn.freebsd.org/changeset/base/210792
Log:
Check that table is not NULL before access, it can be NULL
for some cases.
Approved by: mav (mentor)
MFC after: 2 weeks
Modified:
head/sys/geom/part/g_part.c
Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c Tue Aug 3 09:05:03 2010 (r210791)
+++ head/sys/geom/part/g_part.c Tue Aug 3 09:10:48 2010 (r210792)
@@ -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);
}
More information about the svn-src-all
mailing list