mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 02:56:09 +00:00
fixed missing dereference and cleaned up code in NtCreateEvent
svn path=/trunk/; revision=895
This commit is contained in:
parent
13541861b1
commit
d832a87f14
1 changed files with 3 additions and 9 deletions
|
@ -74,19 +74,13 @@ NTSTATUS STDCALL NtCreateEvent (OUT PHANDLE EventHandle,
|
|||
IN BOOLEAN InitialState)
|
||||
{
|
||||
PKEVENT Event;
|
||||
|
||||
DbgPrint( "Creating Event\n" );
|
||||
Event = ObCreateObject(EventHandle,
|
||||
DesiredAccess,
|
||||
ObjectAttributes,
|
||||
ExEventType);
|
||||
if (ManualReset == TRUE)
|
||||
{
|
||||
KeInitializeEvent(Event,NotificationEvent,InitialState);
|
||||
}
|
||||
else
|
||||
{
|
||||
KeInitializeEvent(Event,SynchronizationEvent,InitialState);
|
||||
}
|
||||
KeInitializeEvent( Event, ManualReset ? NotificationEvent : SynchronizationEvent, InitialState );
|
||||
OnDereferenceObject( Event );
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue