https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2b6df67f0abe387db2a18…
commit 2b6df67f0abe387db2a18d51d0eb728349546e21
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Mar 24 11:59:45 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Mar 24 11:59:45 2018 +0100
[NTOSKRNL] More asserts regarding reference count
CORE-14285
CORE-14480
---
ntoskrnl/cc/view.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index e896c57093..f7e7f5f7c6 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -431,7 +431,7 @@ CcRosReleaseVacb (
CcRosVacbIncRefCount(Vacb);
}
- ASSERT(Vacb->ReferenceCount != 0);
+ ASSERT(Vacb->ReferenceCount > 0);
CcRosReleaseVacbLock(Vacb);
@@ -863,6 +863,9 @@ CcRosGetVacb (
DPRINT("*BaseAddress %p\n", *BaseAddress);
*Vacb = current;
*BaseOffset = current->FileOffset.QuadPart;
+
+ ASSERT(current->ReferenceCount > 1);
+
return STATUS_SUCCESS;
}