Don't free unicode strings in case of error
Modified: trunk/reactos/subsys/win32k/ntuser/keyboard.c
_____
Modified: trunk/reactos/subsys/win32k/ntuser/keyboard.c
--- trunk/reactos/subsys/win32k/ntuser/keyboard.c 2005-05-02
07:04:36 UTC (rev 14943)
+++ trunk/reactos/subsys/win32k/ntuser/keyboard.c 2005-05-02
11:03:54 UTC (rev 14944)
@@ -533,9 +533,8 @@
RtlInitUnicodeString(&FullLayoutPath,SYSTEMROOT_DIR);
if( !NT_SUCCESS(Status) ) {
- DPRINT1("Got default locale but not layout file. (%08x)\n",
+ DPRINT1("Got default locale but not layout file. (%08lx)\n",
Status);
- RtlFreeUnicodeString(&LayoutFile);
} else {
DPRINT("Read registry and got %wZ\n", &LayoutFile);
@@ -566,9 +565,9 @@
if( !kbModule )
DPRINT1( "Load Keyboard Layout: No %wZ\n", &FullLayoutPath );
+
+ RtlFreeUnicodeString(&FullLayoutPath);
}
-
- RtlFreeUnicodeString(&FullLayoutPath);
}
if( !kbModule )
Show replies by date