Author: hpoussin
Date: Thu Sep 4 04:03:47 2008
New Revision: 35924
URL:
http://svn.reactos.org/svn/reactos?rev=35924&view=rev
Log:
Don't free hive if HvInitialize failed, it should be done in the caller (if required)
Modified:
trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
trunk/reactos/lib/cmlib/hiveinit.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c [iso-8859-1] Thu Sep 4 04:03:47
2008
@@ -285,6 +285,7 @@
NULL);
if (!NT_SUCCESS(Status))
{
+ CmpFree(CmHive, 0);
DbgPrint((DPRINT_REGISTRY, "Invalid hive Signature!\n"));
return FALSE;
}
Modified: trunk/reactos/lib/cmlib/hiveinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hiveinit.c?rev=3…
==============================================================================
--- trunk/reactos/lib/cmlib/hiveinit.c [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/hiveinit.c [iso-8859-1] Thu Sep 4 04:03:47 2008
@@ -498,10 +498,7 @@
}
if (!NT_SUCCESS(Status))
- {
- Hive->Free(Hive, 0);
return Status;
- }
if (Operation != HINIT_CREATE) CmPrepareHive(Hive);