mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +00:00
[NTOS:CM]
- Correctly delete resource in failure cases of CmpInitializeHive. Fixes pool corruption when trying to load an invalid hive file. svn path=/trunk/; revision=63949
This commit is contained in:
@@ -201,6 +201,7 @@ CmpInitializeHive(OUT PCMHIVE *RegistryHive,
|
||||
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 @@ CmpInitializeHive(OUT PCMHIVE *RegistryHive,
|
||||
if (CheckStatus != 0)
|
||||
{
|
||||
/* Cleanup allocations and fail */
|
||||
ExDeleteResourceLite(Hive->FlusherLock);
|
||||
ExFreePoolWithTag(Hive->FlusherLock, TAG_CM);
|
||||
ExFreePoolWithTag(Hive->ViewLock, TAG_CM);
|
||||
ExFreePoolWithTag(Hive, TAG_CM);
|
||||
|
||||
Reference in New Issue
Block a user