https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d7abae76b834300d197f2c63f5aba4ac0d37eb6d

commit d7abae76b834300d197f2c63f5aba4ac0d37eb6d
Author:     Pierre Schweitzer <[email protected]>
AuthorDate: Thu Mar 22 22:34:21 2018 +0100
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Thu Mar 22 22:35:19 2018 +0100

    [KMTESTS:MM] Truncate file cache on uninitialize to avoid leaking a 
reference.
    
    ROSTESTS-266
---
 modules/rostests/kmtests/ntos_mm/NtCreateSection_drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/kmtests/ntos_mm/NtCreateSection_drv.c 
b/modules/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
index 5642ea5b2c..45f20b5e85 100644
--- a/modules/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
+++ b/modules/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
@@ -416,10 +416,12 @@ TestIrpHandler(
         if (IoStack->FileObject->SectionObjectPointer != NULL &&
             IoStack->FileObject->SectionObjectPointer->SharedCacheMap != NULL)
         {
+            LARGE_INTEGER Zero = RTL_CONSTANT_LARGE_INTEGER(0LL);
+
             CcFlushCache(&Fcb->SectionObjectPointers, NULL, 0, NULL);
             CcPurgeCacheSection(&Fcb->SectionObjectPointers, NULL, 0, FALSE);
             KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, 
FALSE);
-            CcUninitializeCacheMap(IoStack->FileObject, NULL, 
&CacheUninitEvent);
+            CcUninitializeCacheMap(IoStack->FileObject, &Zero, 
&CacheUninitEvent);
             KeWaitForSingleObject(&CacheUninitEvent.Event, Executive, 
KernelMode, FALSE, NULL);
         }
         ExFreePoolWithTag(Fcb, 'FwrI');

Reply via email to