mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 18:22:35 +00:00
[KMTESTS:CC] Truncate file cache on uninitialize to avoid leaking a reference. ROSTESTS-264 ROSTESTS-300
This commit is contained in:
parent
c100ec6e7b
commit
d7ad37a165
2 changed files with 4 additions and 2 deletions
|
@ -198,6 +198,7 @@ CleanupTest(
|
|||
ULONG TestId,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
LARGE_INTEGER Zero = RTL_CONSTANT_LARGE_INTEGER(0LL);
|
||||
CACHE_UNINITIALIZE_EVENT CacheUninitEvent;
|
||||
|
||||
ok_eq_pointer(TestDeviceObject, DeviceObject);
|
||||
|
@ -208,7 +209,7 @@ CleanupTest(
|
|||
if (CcIsFileCached(TestFileObject))
|
||||
{
|
||||
KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE);
|
||||
CcUninitializeCacheMap(TestFileObject, NULL, &CacheUninitEvent);
|
||||
CcUninitializeCacheMap(TestFileObject, &Zero, &CacheUninitEvent);
|
||||
KeWaitForSingleObject(&CacheUninitEvent.Event, Executive, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue