[NTOSKRNL] More asserts regarding reference count
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Mar 2018 10:59:45 +0000 (11:59 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Mar 2018 10:59:45 +0000 (11:59 +0100)
CORE-14285
CORE-14480

ntoskrnl/cc/view.c

index e896c57..f7e7f5f 100644 (file)
@@ -431,7 +431,7 @@ CcRosReleaseVacb (
         CcRosVacbIncRefCount(Vacb);
     }
 
         CcRosVacbIncRefCount(Vacb);
     }
 
-    ASSERT(Vacb->ReferenceCount != 0);
+    ASSERT(Vacb->ReferenceCount > 0);
 
     CcRosReleaseVacbLock(Vacb);
 
 
     CcRosReleaseVacbLock(Vacb);
 
@@ -863,6 +863,9 @@ CcRosGetVacb (
     DPRINT("*BaseAddress %p\n", *BaseAddress);
     *Vacb = current;
     *BaseOffset = current->FileOffset.QuadPart;
     DPRINT("*BaseAddress %p\n", *BaseAddress);
     *Vacb = current;
     *BaseOffset = current->FileOffset.QuadPart;
+
+    ASSERT(current->ReferenceCount > 1);
+
     return STATUS_SUCCESS;
 }
 
     return STATUS_SUCCESS;
 }