From ebe277b7962e6f1c565085105832f30d5bf88330 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 7 Aug 2005 23:37:59 +0000 Subject: [PATCH] use the correct pointer to free the string. Thx to Hartmut for spotting this bug svn path=/trunk/; revision=17190 --- reactos/subsys/csrss/win32csr/conio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsys/csrss/win32csr/conio.c b/reactos/subsys/csrss/win32csr/conio.c index 1ef05d3d472..fdcca68aefe 100644 --- a/reactos/subsys/csrss/win32csr/conio.c +++ b/reactos/subsys/csrss/win32csr/conio.c @@ -1545,7 +1545,7 @@ ConioComputeUpdateRect(PCSRSS_SCREEN_BUFFER Buff, RECT *UpdateRect, COORD *Start CSR_API(CsrWriteConsoleOutputChar) { NTSTATUS Status; - PCHAR String; + PCHAR String, tmpString = NULL; PBYTE Buffer; PCSRSS_CONSOLE Console; PCSRSS_SCREEN_BUFFER Buff; @@ -1577,7 +1577,7 @@ CSR_API(CsrWriteConsoleOutputChar) (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, @@ -1635,7 +1635,7 @@ CSR_API(CsrWriteConsoleOutputChar) } if (Request->Data.WriteConsoleRequest.Unicode) { - RtlFreeHeap(GetProcessHeap(), 0, String); + RtlFreeHeap(GetProcessHeap(), 0, tmpString); } } if (NULL != Console)