mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[USETUP] Free allocated memory after loading the new text-mode font from the .CAB file.
This commit is contained in:
parent
4ab49bc276
commit
e8c9a73bb8
1 changed files with 6 additions and 0 deletions
|
@ -733,8 +733,11 @@ SetConsoleOutputCP(
|
|||
if (CabStatus != CAB_STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT("CabinetLoadFile('%S', '%S') returned 0x%08x\n", FontFile, FontName, CabStatus);
|
||||
if (ConsoleCabinetContext.Data)
|
||||
RtlFreeHeap(ProcessHeap, 0, ConsoleCabinetContext.Data);
|
||||
return FALSE;
|
||||
}
|
||||
ASSERT(ConsoleCabinetContext.Data);
|
||||
|
||||
Status = NtDeviceIoControlFile(hConsoleOutput,
|
||||
NULL,
|
||||
|
@ -746,6 +749,9 @@ SetConsoleOutputCP(
|
|||
ConsoleCabinetContext.Size,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
RtlFreeHeap(ProcessHeap, 0, ConsoleCabinetContext.Data);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue