mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[NTOSKRNL]
Fix a bug in FsRtlNotifyCleanup: only remove notification from list when we're about to complete it. svn path=/trunk/; revision=55932
This commit is contained in:
parent
4c30c5549a
commit
9624a85234
1 changed files with 4 additions and 3 deletions
|
@ -182,12 +182,13 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync,
|
||||||
{
|
{
|
||||||
FsRtlNotifyCompleteIrpList(NotifyChange, STATUS_NOTIFY_CLEANUP);
|
FsRtlNotifyCompleteIrpList(NotifyChange, STATUS_NOTIFY_CLEANUP);
|
||||||
}
|
}
|
||||||
/* Remove from the list */
|
|
||||||
RemoveEntryList(&NotifyChange->NotifyList);
|
|
||||||
|
|
||||||
/* Downcrease reference number and if 0 is reached, it's time to do complete cleanup */
|
/* Decrease reference number and if 0 is reached, it's time to do complete cleanup */
|
||||||
if (!InterlockedDecrement((PLONG)&(NotifyChange->ReferenceCount)))
|
if (!InterlockedDecrement((PLONG)&(NotifyChange->ReferenceCount)))
|
||||||
{
|
{
|
||||||
|
/* Remove it from the notifications list */
|
||||||
|
RemoveEntryList(&NotifyChange->NotifyList);
|
||||||
|
|
||||||
/* In case there was an allocated buffer, free it */
|
/* In case there was an allocated buffer, free it */
|
||||||
if (NotifyChange->AllocatedBuffer)
|
if (NotifyChange->AllocatedBuffer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue