mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
msdosfs: fix vnode leak with msdosfs_rename()
This could happen when failing due to disappearing source file.
Reviewed By: kib
Tested by: pho
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27338
(cherry picked from commit b8073b3c74)
This commit is contained in:
parent
e681d7d702
commit
f6082ba9d2
1 changed files with 8 additions and 0 deletions
|
|
@ -1122,6 +1122,14 @@ abortit:
|
|||
VOP_UNLOCK(tdvp);
|
||||
vrele(tdvp);
|
||||
vrele(ap->a_fvp);
|
||||
/*
|
||||
* fdvp may be locked and has a reference. We need to
|
||||
* release the lock and reference, unless to and from
|
||||
* directories are the same. In that case it is already
|
||||
* unlocked.
|
||||
*/
|
||||
if (tdvp != fdvp)
|
||||
vput(fdvp);
|
||||
return 0;
|
||||
}
|
||||
xp = VTODE(fvp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue