mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
217c0f89e3
commit
1fbcf0ac65
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue