This commit is contained in:
DavidXanatos 2023-05-25 17:54:30 +02:00
parent 8a9480f590
commit 22c6feb72f
2 changed files with 9 additions and 6 deletions

View File

@ -285,15 +285,15 @@ _FX BOOLEAN File_Init_Filter(void)
_FX void File_Unload_Filter(void)
{
if (File_ProtectedRootsLock) {
Mem_FreeLockResource(&File_ProtectedRootsLock);
File_ProtectedRootsLock = NULL;
}
if (File_FilterCookie) {
FltUnregisterFilter(File_FilterCookie);
File_FilterCookie = NULL;
}
if (File_ProtectedRootsLock) {
Mem_FreeLockResource(&File_ProtectedRootsLock);
File_ProtectedRootsLock = NULL;
}
}

View File

@ -712,6 +712,9 @@ mount_loop:
mount = List_Next(mount);
}
if (!failed && proc->box->key_path_len >= MAX_REG_ROOT_LEN)
failed = TRUE;
//
// if we haven't failed, but also couldn't find a mount, then
// initialize a new mount point, with a zero reference count.
@ -1143,7 +1146,7 @@ unmount_loop:
goto unmount_loop;
}
wcscpy(args->path.val, mount->root_key); // todo: ensure that root_key_len cant be greater the MAX_REG_ROOT_LEN
wcscpy(args->path.val, mount->root_key);
mount->unmount_pending = FALSE;