-
-
Notifications
You must be signed in to change notification settings - Fork 638
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
require('nvim-tree.utils').read_file
does not close fd
if stat
is falsy, potentially leaving hanging file descriptors.
Neovim version
NVIM v0.12.0-dev-582e071-dirty
Build type: Release
LuaJIT 2.1.1731601260
Operating system and version
Linux 6.6.87.2-microsoft-standard-WSL2
Windows variant
WSL
nvim-tree version
master
Clean room replication
vim.pack.add({ 'https://github.com/nvim-tree/nvim-tree.lua' }, { load = true })
Steps to reproduce
nvim
- Do anything that makes
nvim-tree.lua
callrequire('nvim-tree.utils').read_file
- On the off chance that it fails to
fstat(2)
, it leaves a hanging file descriptor
Expected behavior
require('nvim-tree.utils').read_file
calls vim.loop.fs_close(fd)
prior to returning, if stat
is falsy.
Actual behavior
require('nvim-tree.utils').read_file
does not call vim.loop.fs_close(fd)
prior to returning, when stat
is falsy.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working