Don't free hive if HvInitialize failed, it should be done in the caller (if required)

svn path=/trunk/; revision=35924
This commit is contained in:
Hervé Poussineau 2008-09-04 09:03:47 +00:00
parent e277bd0048
commit 24e14f2ba8
2 changed files with 1 additions and 3 deletions

View file

@ -285,6 +285,7 @@ RegImportBinaryHive(PCHAR ChunkBase,
NULL);
if (!NT_SUCCESS(Status))
{
CmpFree(CmHive, 0);
DbgPrint((DPRINT_REGISTRY, "Invalid hive Signature!\n"));
return FALSE;
}

View file

@ -498,10 +498,7 @@ HvInitialize(
}
if (!NT_SUCCESS(Status))
{
Hive->Free(Hive, 0);
return Status;
}
if (Operation != HINIT_CREATE) CmPrepareHive(Hive);