Fix the bug in rev. 1.232. If vfs_suser returned false, coveredvp shall be

unlocked only if it really exists.

Found with:	Coverity Prevent(tm)
CID:	1535
Approved by:	pjd (mentor)
This commit is contained in:
Konstantin Belousov 2006-09-19 14:04:12 +00:00
parent af72db7175
commit f37e633887

View File

@ -1151,7 +1151,8 @@ dounmount(mp, flags, td)
*/
error = vfs_suser(mp, td);
if (error) {
VOP_UNLOCK(coveredvp, 0, td);
if (coveredvp)
VOP_UNLOCK(coveredvp, 0, td);
return (error);
}