Call vn_close on the backing file vnode if ufs_extattr_enable failed to

avoid leaking it.

Reviewed by:	rwatson
This commit is contained in:
Thomas Moestl 2001-06-07 00:11:32 +00:00
parent 217c0f89e3
commit 1fbcf0ac65

View File

@ -345,7 +345,10 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
VOP_UNLOCK(vp, 0, p);
return (ufs_extattr_enable(ump, attrnamespace, attrname, vp, p));
error = ufs_extattr_enable(ump, attrnamespace, attrname, vp, p);
if (error != 0)
vn_close(vp, FREAD|FWRITE, p->p_ucred, p);
return (error);
}
#ifdef UFS_EXTATTR_AUTOSTART