mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +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)
|
if (CabStatus != CAB_STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
DPRINT("CabinetLoadFile('%S', '%S') returned 0x%08x\n", FontFile, FontName, CabStatus);
|
DPRINT("CabinetLoadFile('%S', '%S') returned 0x%08x\n", FontFile, FontName, CabStatus);
|
||||||
|
if (ConsoleCabinetContext.Data)
|
||||||
|
RtlFreeHeap(ProcessHeap, 0, ConsoleCabinetContext.Data);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
ASSERT(ConsoleCabinetContext.Data);
|
||||||
|
|
||||||
Status = NtDeviceIoControlFile(hConsoleOutput,
|
Status = NtDeviceIoControlFile(hConsoleOutput,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -746,6 +749,9 @@ SetConsoleOutputCP(
|
||||||
ConsoleCabinetContext.Size,
|
ConsoleCabinetContext.Size,
|
||||||
NULL,
|
NULL,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
RtlFreeHeap(ProcessHeap, 0, ConsoleCabinetContext.Data);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue