Fixed dereference of a NULL pointer.

Reported by:	Peter Holm
This commit is contained in:
Kirk McKusick 2011-06-18 21:10:03 +00:00
parent 30d1616ed8
commit 9957ac07b2

View File

@ -1918,7 +1918,8 @@ ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, wkhd)
if (savedcbp) {
vp = savedcbp->b_vp;
bawrite(savedcbp);
if ((vtype == VDIR || dopersistence) && ip->i_effnlink > 0)
if ((vtype == VDIR || dopersistence) &&
VTOI(vp)->i_effnlink > 0)
(void) ffs_syncvnode(vp, MNT_WAIT);
}
/*