mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:32:56 +00:00
[NTOS:EX] Don't dereference ExpCritSecOutOfMemoryEvent when it was never referenced.
This commit is contained in:
parent
c32993c672
commit
f555c102b7
1 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue