CSR_API(CsrWriteConsoleOutputChar)
{
NTSTATUS Status;
- PCHAR String;
+ PCHAR String, tmpString = NULL;
PBYTE Buffer;
PCSRSS_CONSOLE Console;
PCSRSS_SCREEN_BUFFER Buff;
(PWCHAR)Request->Data.WriteConsoleOutputCharRequest.String,
Request->Data.WriteConsoleOutputCharRequest.Length,
NULL, 0, NULL, NULL);
- String = RtlAllocateHeap(GetProcessHeap(), 0, Length);
+ tmpString = String = RtlAllocateHeap(GetProcessHeap(), 0, Length);
if (String)
{
WideCharToMultiByte(Console->CodePage, 0,
}
if (Request->Data.WriteConsoleRequest.Unicode)
{
- RtlFreeHeap(GetProcessHeap(), 0, String);
+ RtlFreeHeap(GetProcessHeap(), 0, tmpString);
}
}
if (NULL != Console)