From 655753c557afb221302aaa1935fee82021afff3f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 2 Feb 2019 17:42:16 +0100 Subject: [PATCH] SharedGraphics: Fix Font.cpp kernel build. --- SharedGraphics/Font.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SharedGraphics/Font.cpp b/SharedGraphics/Font.cpp index c402241980..a667fd8c1a 100644 --- a/SharedGraphics/Font.cpp +++ b/SharedGraphics/Font.cpp @@ -1,6 +1,7 @@ #include "Font.h" #include "Peanut8x10.h" #include "Liza8x10.h" +#include #define DEFAULT_FONT_NAME Liza8x10 @@ -37,9 +38,9 @@ RetainPtr Font::clone() const { size_t bytes_per_glyph = glyph_width() * glyph_height(); // FIXME: This is leaked! - char** new_glyphs = static_cast(malloc(sizeof(char*) * 256)); + char** new_glyphs = static_cast(kmalloc(sizeof(char*) * 256)); for (unsigned i = 0; i < 256; ++i) { - new_glyphs[i] = static_cast(malloc(bytes_per_glyph)); + new_glyphs[i] = static_cast(kmalloc(bytes_per_glyph)); if (i >= m_first_glyph && i <= m_last_glyph) { memcpy(new_glyphs[i], m_glyphs[i - m_first_glyph], bytes_per_glyph); } else {