Author: pschweitzer Date: Wed Feb 29 19:43:35 2012 New Revision: 55932
URL: http://svn.reactos.org/svn/reactos?rev=55932&view=rev Log: [NTOSKRNL] Fix a bug in FsRtlNotifyCleanup: only remove notification from list when we're about to complete it.
Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c
Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/notify.c?rev... ============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] Wed Feb 29 19:43:35 2012 @@ -182,12 +182,13 @@ { 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))) { + /* Remove it from the notifications list */ + RemoveEntryList(&NotifyChange->NotifyList); + /* In case there was an allocated buffer, free it */ if (NotifyChange->AllocatedBuffer) {