kernel32: Don't leak an event handle on errors.
This commit is contained in:
parent
70bff7377d
commit
2e21381177
|
@ -190,12 +190,14 @@ BOOL WINAPI ReadDirectoryChangesW( HANDLE handle, LPVOID buffer, DWORD len, BOOL
|
|||
return TRUE;
|
||||
|
||||
WaitForSingleObjectEx( ov.hEvent, INFINITE, TRUE );
|
||||
CloseHandle( ov.hEvent );
|
||||
if (returned)
|
||||
*returned = ios->Information;
|
||||
status = ios->u.Status;
|
||||
}
|
||||
|
||||
if (!overlapped)
|
||||
CloseHandle( ov.hEvent );
|
||||
|
||||
if (status != STATUS_SUCCESS)
|
||||
{
|
||||
SetLastError( RtlNtStatusToDosError(status) );
|
||||
|
|
Loading…
Reference in New Issue