]> wimlib.net Git - wimlib/commit
win32_replacements.c: fix handle closing in win32_wglob()
authorEric Biggers <ebiggers3@gmail.com>
Tue, 27 Oct 2020 03:17:02 +0000 (20:17 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 27 Oct 2020 03:24:39 +0000 (20:24 -0700)
commit8a87f778734e10a2bb958d2e61c3185ef6970867
treeb1ed53b30fe816cca9d2c81ff4489115f2821388
parentc7a245a79742733b2c3a5a203d4096d78c67f48a
win32_replacements.c: fix handle closing in win32_wglob()

The handle returned by FindFirstFileW() needs to be closed by
FindClose(), not by CloseHandle().

This is a very old bug, which presumably wasn't noticed before because
ordinarily it just leaked the handle.  However, this bug caused a SEH
exception when wimlib was run under a debugger.
src/win32_replacements.c