[NTOS]: Reorder the destruction code in CmpDestroyHive() to make it similar to the one in CmUnloadKey(). Same remark for a comment in NtUnloadKey2() too.

svn path=/trunk/; revision=75065
This commit is contained in:
Hermès Bélusca-Maïto 2017-06-16 21:02:27 +00:00
parent 4d90c65d54
commit 3c50fb3900
2 changed files with 7 additions and 7 deletions

View file

@ -234,6 +234,12 @@ CmpDestroyHive(IN PCMHIVE CmHive)
RemoveEntryList(&CmHive->HiveList);
ExReleasePushLock(&CmpHiveListHeadLock);
/* Destroy the security descriptor cache */
CmpDestroySecurityCache(CmHive);
/* Destroy the view list */
CmpDestroyHiveViewList(CmHive);
/* Delete the flusher lock */
ExDeleteResourceLite(CmHive->FlusherLock);
ExFreePoolWithTag(CmHive->FlusherLock, TAG_CMHIVE);
@ -241,12 +247,6 @@ CmpDestroyHive(IN PCMHIVE CmHive)
/* Delete the view lock */
ExFreePoolWithTag(CmHive->ViewLock, TAG_CMHIVE);
/* Destroy the security descriptor cache */
CmpDestroySecurityCache(CmHive);
/* Destroy the view list */
CmpDestroyHiveViewList(CmHive);
/* Free the hive storage */
HvFree(&CmHive->Hive);

View file

@ -1521,7 +1521,7 @@ NtUnloadKey2(IN POBJECT_ATTRIBUTES TargetKey,
{
if (Flags != REG_FORCE_UNLOAD)
{
/* Release two KCBs lock */
/* Release the KCB locks */
CmpReleaseTwoKcbLockByKey(ChildConv, ParentConv);
/* Release the hive loading lock */