winpr/file: Fix leak found by covscan
overwrite_var: Overwriting handle "h" in "h = (HANDLE)0xffffffffffffffff" leaks the handle.
This commit is contained in:
parent
24eb53e207
commit
acbd6e6322
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user