[NTOS:EX] Don't dereference ExpCritSecOutOfMemoryEvent when it was never referenced.

This commit is contained in:
Timo Kreuzer 2017-10-22 10:57:40 +02:00
parent c32993c672
commit f555c102b7

View file

@ -457,8 +457,11 @@ NtWaitForKeyedEvent(
/* Do the wait */
Status = ExpWaitForKeyedEvent(KeyedEvent, Key, Alertable, Timeout);
if (Handle != NULL)
{
/* Dereference the keyed event */
ObDereferenceObject(KeyedEvent);
}
/* Return the status */
return Status;
@ -523,8 +526,11 @@ NtReleaseKeyedEvent(
/* Do the wait */
Status = ExpReleaseKeyedEvent(KeyedEvent, Key, Alertable, Timeout);
if (Handle != NULL)
{
/* Dereference the keyed event */
ObDereferenceObject(KeyedEvent);
}
/* Return the status */
return Status;