Commit 2e213811 authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Alexandre Julliard

kernel32: Don't leak an event handle on errors.

parent 70bff737
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment