Close the bootlog key if value enumeration or writing to the log file fails.
authorEric Kohl <eric.kohl@reactos.org>
Fri, 24 Sep 2004 15:00:34 +0000 (15:00 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Fri, 24 Sep 2004 15:00:34 +0000 (15:00 +0000)
svn path=/trunk/; revision=11027

reactos/ntoskrnl/io/bootlog.c

index cb97cb3..40e4d07 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: bootlog.c,v 1.2 2004/09/24 10:51:35 ekohl Exp $
+/* $Id: bootlog.c,v 1.3 2004/09/24 15:00:34 ekohl Exp $
  *
  * COPYRIGHT:      See COPYING in the top level directory
  * PROJECT:        ReactOS kernel
@@ -395,6 +395,7 @@ IopSaveBootLogToFile(VOID)
       if (!NT_SUCCESS(Status))
        {
          CHECKPOINT1;
+         NtClose(KeyHandle);
          ExFreePool(KeyInfo);
          ExReleaseResourceLite(&IopBootLogResource);
          return;
@@ -404,6 +405,7 @@ IopSaveBootLogToFile(VOID)
       if (!NT_SUCCESS(Status))
        {
          CHECKPOINT1;
+         NtClose(KeyHandle);
          ExFreePool(KeyInfo);
          ExReleaseResourceLite(&IopBootLogResource);
          return;
@@ -424,8 +426,4 @@ IopSaveBootLogToFile(VOID)
   DPRINT("IopSaveBootLogToFile() done\n");
 }
 
-
-
-
-
 /* EOF */