From 3c50fb3900b5e0f471777c60b931545237d72116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 16 Jun 2017 21:02:27 +0000 Subject: [PATCH] [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 --- reactos/ntoskrnl/config/cminit.c | 12 ++++++------ reactos/ntoskrnl/config/ntapi.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/config/cminit.c b/reactos/ntoskrnl/config/cminit.c index cd8b94dd646..502892f80f5 100644 --- a/reactos/ntoskrnl/config/cminit.c +++ b/reactos/ntoskrnl/config/cminit.c @@ -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); diff --git a/reactos/ntoskrnl/config/ntapi.c b/reactos/ntoskrnl/config/ntapi.c index b47f77ffd49..03bcc3dc067 100644 --- a/reactos/ntoskrnl/config/ntapi.c +++ b/reactos/ntoskrnl/config/ntapi.c @@ -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 */