Hello, please find attached a patch for src/win32-glob.c I have just realized, that the merge requests are not in use [1], so I am posting the patch file here. Fix win32-glob.c resource leak hfindfile Open the HANDLE hfindfile later, after the checks of pattern, flags, unused, pglob and length of file name. This avoids a possible return from function glob() without FindClose(hfindfile). - Fixes the following Cppcheck errors:   [src/win32-glob.c:80]     (error) Resource leak: hfindfile [resourceLeak]   [src/win32-glob.c:88]     (error) Resource leak: hfindfile [resourceLeak] Best regards Wolfgang [1] https://sourceforge.net/p/sox/code/merge-requests/7/