1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

Check that table is not NULL before access, it can be NULL

for some cases.

Approved by:	mav (mentor)
MFC after:	2 weeks
This commit is contained in:
Andrey V. Elsukov 2010-08-03 09:10:48 +00:00
parent e3649d5a2f
commit a45f4c6e2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210792

View File

@ -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);
}