mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOSKRNL:CONFIG]
CmShutdownSystem: Close all hive files after flushing the hives. svn path=/trunk/; revision=63897
This commit is contained in:
parent
cd26effabd
commit
50aa823cdb
1 changed files with 23 additions and 0 deletions
|
@ -2043,12 +2043,35 @@ VOID
|
|||
NTAPI
|
||||
CmShutdownSystem(VOID)
|
||||
{
|
||||
PLIST_ENTRY ListEntry;
|
||||
PCMHIVE Hive;
|
||||
ULONG i;
|
||||
|
||||
/* Kill the workers */
|
||||
if (!CmFirstTime) CmpShutdownWorkers();
|
||||
|
||||
/* Flush all hives */
|
||||
CmpLockRegistryExclusive();
|
||||
CmpDoFlushAll(TRUE);
|
||||
|
||||
/* Close all hive files */
|
||||
ListEntry = CmpHiveListHead.Flink;
|
||||
while (ListEntry != &CmpHiveListHead)
|
||||
{
|
||||
Hive = CONTAINING_RECORD(ListEntry, CMHIVE, HiveList);
|
||||
|
||||
for (i = 0; i < HFILE_TYPE_MAX; i++)
|
||||
{
|
||||
if (Hive->FileHandles[i] != NULL)
|
||||
{
|
||||
ZwClose(Hive->FileHandles[i]);
|
||||
Hive->FileHandles[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ListEntry = ListEntry->Flink;
|
||||
}
|
||||
|
||||
CmpUnlockRegistry();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue