https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f986527d49026fa538c6b6...
commit f986527d49026fa538c6b61d7c12752124000de8 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Wed Nov 27 01:30:56 2019 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Wed Nov 27 01:30:56 2019 +0100
[BOOTLIB] Remove a useless 'FontDirectory' check as it becomes always valid (!= NULL) through the function. CORE-11590
Adapted from Victor Martinez patch & Serge Gautherie PR #2062 --- boot/environ/lib/io/display/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/boot/environ/lib/io/display/display.c b/boot/environ/lib/io/display/display.c index 6c186df37a1..9e5ab92bb51 100644 --- a/boot/environ/lib/io/display/display.c +++ b/boot/environ/lib/io/display/display.c @@ -91,9 +91,9 @@ DsppLoadFontFile ( if (!FontDirectory) { /* Use the boot device and boot directory */ + CustomDevice = FALSE; FontDevice = BlpBootDevice; FontDirectory = L"\EFI\Microsoft\Boot\Fonts"; - CustomDevice = FALSE; } else { @@ -157,8 +157,9 @@ Quickie: }
/* Check if we had a custom font directory allocated and free it */ - if ((FontDirectory) && (CustomDirectory)) + if ((CustomDirectory) && (CustomDevice)) { + ASSERT(FontDirectory); BlMmFreeHeap(FontDirectory); }