Author: tfaber
Date: Tue Aug 26 10:49:38 2014
New Revision: 63949
URL:
http://svn.reactos.org/svn/reactos?rev=63949&view=rev
Log:
[NTOS:CM]
- Correctly delete resource in failure cases of CmpInitializeHive. Fixes pool corruption
when trying to load an invalid hive file.
Modified:
trunk/reactos/ntoskrnl/config/cminit.c
Modified: trunk/reactos/ntoskrnl/config/cminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cminit.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cminit.c [iso-8859-1] Tue Aug 26 10:49:38 2014
@@ -201,6 +201,7 @@
if (!NT_SUCCESS(Status))
{
/* Cleanup allocations and fail */
+ ExDeleteResourceLite(Hive->FlusherLock);
ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
ExFreePoolWithTag(Hive->ViewLock, TAG_CM);
ExFreePoolWithTag(Hive, TAG_CM);
@@ -218,6 +219,7 @@
if (CheckStatus != 0)
{
/* Cleanup allocations and fail */
+ ExDeleteResourceLite(Hive->FlusherLock);
ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
ExFreePoolWithTag(Hive->ViewLock, TAG_CM);
ExFreePoolWithTag(Hive, TAG_CM);