mirror of
https://github.com/reactos/reactos.git
synced 2025-05-23 19:14:48 +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)
|
IN BOOLEAN InitialState)
|
||||||
{
|
{
|
||||||
PKEVENT Event;
|
PKEVENT Event;
|
||||||
|
DbgPrint( "Creating Event\n" );
|
||||||
Event = ObCreateObject(EventHandle,
|
Event = ObCreateObject(EventHandle,
|
||||||
DesiredAccess,
|
DesiredAccess,
|
||||||
ObjectAttributes,
|
ObjectAttributes,
|
||||||
ExEventType);
|
ExEventType);
|
||||||
if (ManualReset == TRUE)
|
KeInitializeEvent( Event, ManualReset ? NotificationEvent : SynchronizationEvent, InitialState );
|
||||||
{
|
OnDereferenceObject( Event );
|
||||||
KeInitializeEvent(Event,NotificationEvent,InitialState);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
KeInitializeEvent(Event,SynchronizationEvent,InitialState);
|
|
||||||
}
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue