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…
==============================================================================
--- 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;
}