[ros-diffs] [mkupfer] 48888: one more fix (on request of Pierre S.)

mkupfer at svn.reactos.org mkupfer at svn.reactos.org
Sat Sep 25 19:24:04 UTC 2010


Author: mkupfer
Date: Sat Sep 25 19:24:03 2010
New Revision: 48888

URL: http://svn.reactos.org/svn/reactos?rev=48888&view=rev
Log:
one more fix (on request of Pierre S.)

Modified:
    trunk/reactos/base/setup/usetup/settings.c

Modified: trunk/reactos/base/setup/usetup/settings.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/settings.c?rev=48888&r1=48887&r2=48888&view=diff
==============================================================================
--- trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] Sat Sep 25 19:24:03 2010
@@ -683,14 +683,12 @@
                             REG_SZ,
                             (PVOID)(LanguageId + 4),
                             8 * sizeof(PWCHAR));
+    NtClose(KeyHandle);
     if (!NT_SUCCESS(Status))
     {
         DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    NtClose(KeyHandle);
+        return FALSE;
+    }
 
     return TRUE;
 }
@@ -990,14 +988,13 @@
                                    REG_SZ,
                                    (PVOID)Id,
                                    (wcslen(Id) + 1) * sizeof(WCHAR));
+    NtClose(KeyHandle);
     if (!NT_SUCCESS(Status))
     {
          DPRINT1("NtSetValueKey() failed (Status = %lx)\n", Status);
-         NtClose(KeyHandle);
          return FALSE;
     }
 
-    NtClose(KeyHandle);
     return TRUE;
 }
 




More information about the Ros-diffs mailing list