mirror of
https://github.com/nushell/nushell.git
synced 2025-05-14 03:34:32 +00:00
While inspecting the Windows specific code of `ls` for #15311 I stumbled upon an unrelated issue in the alternate metadata gathering on Windows (added by #5703). The handle created by performing `FindFirstFileW` was never closed, leading to a potential leak. Fixed by running `FindClose` as soon as the operation succeeds. https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findfirstfilew#remarks