git: fbb102b2cec5 - releng/13.2 - fusefs: fix some resource leaks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 19 Feb 2023 23:43:30 UTC
The branch releng/13.2 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=fbb102b2cec57181d0b00d81e8de384021f60ab0 commit fbb102b2cec57181d0b00d81e8de384021f60ab0 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-02-11 23:43:30 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-02-19 23:42:32 +0000 fusefs: fix some resource leaks fusefs would leak tickets in three cases: * After FUSE_CREATE, if the server returned a bad inode number. * After a FUSE_FALLOCATE operation during VOP_ALLOCATE * After a FUSE_FALLOCATE operation during VOP_DEALLOCATE Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38526 (cherry picked from commit 1bdf879b97b686a8f36fdba050b68f9e7493f363) MFC Note: changes to VOP_DEALLOCATE are not MFCed, because that VOP does not exist in stable/13. Approved by: re (cperciva) (cherry picked from commit 57756461548b813c288e190900de31e847e412f9) --- sys/fs/fuse/fuse_vnops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index eaace113d67e..7fd96ff639ff 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -668,6 +668,7 @@ fuse_vnop_allocate(struct vop_allocate_args *ap) } } + fdisp_destroy(&fdi); return (err); } @@ -1104,6 +1105,7 @@ fuse_vnop_create(struct vop_create_args *ap) uint64_t nodeid = feo->nodeid; uint64_t fh_id = foo->fh; + fdisp_destroy(fdip); fdisp_init(fdip, sizeof(*fri)); fdisp_make(fdip, FUSE_RELEASE, mp, nodeid, td, cred); fri = fdip->indata;