mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +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:
parent
090134e9e6
commit
10e9fc81a1
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue