fix delete fonts

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2020-03-13 11:44:45 +03:00
parent 697cc5e4b9
commit 07f5c88a8f
2 changed files with 60 additions and 57 deletions

View File

@ -630,18 +630,21 @@ static VOID StartLoader(IN LOADER_ENTRY *Entry)
// OSIcons
NSVGfontChain *fontChain = fontsDB;
while (fontChain) {
DBG("free fontChain \n");
font = fontChain->font;
NSVGfontChain *nextChain = fontChain->next;
if (font) {
nsvg__deleteFont(font);
fontChain->font = NULL;
}
fontChain = fontChain->next;
FreePool(fontChain);
fontChain = nextChain->next;
}
// nsvg__deleteParser(mainParser); //temporary disabled
//destruct_globals_objects(NULL); //we can't destruct our globals here. We need, for example, Volumes.
//DumpKernelAndKextPatches(Entry->KernelAndKextPatches);
DBG("start loader\n");
// Load image into memory (will be started later)
Status = LoadEFIImage(Entry->DevicePath, Basename(Entry->LoaderPath), NULL, &ImageHandle);
if (EFI_ERROR(Status)) {