winpr/file: Fix leak found by covscan

overwrite_var: Overwriting handle "h" in "h = (HANDLE)0xffffffffffffffff" leaks the handle.
This commit is contained in:
Ondrej Holy 2018-08-20 09:47:33 +02:00
parent 24eb53e207
commit acbd6e6322

View File

@ -1008,6 +1008,7 @@ HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData)
if (!ConvertFindDataAToW(fd, lpFindFileData))
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
FindClose(h);
h = INVALID_HANDLE_VALUE;
goto out;
}