From 1c2f99821454a98f9818024e5539b2ea0130557b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 24 Apr 2026 12:48:48 -0400 Subject: [PATCH] bootloader: Avoid allocating the logo image in kernel_args space. We never send it to the kernel but always free it. The kernel_args allocator is very simple and can't handle frees besides the most recent data, so this avoids "leaking" some kernel_args memory (it should all be freed by the kernel later, though, so that only matters for the bootloader itself.) --- src/system/boot/platform/generic/video_splash.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/boot/platform/generic/video_splash.cpp b/src/system/boot/platform/generic/video_splash.cpp index d6703840de..5b5931c912 100644 --- a/src/system/boot/platform/generic/video_splash.cpp +++ b/src/system/boot/platform/generic/video_splash.cpp @@ -138,7 +138,7 @@ video_display_splash(addr_t frameBuffer) switch (gKernelArgs.frame_buffer.depth) { case 8: platform_set_palette(k8BitPalette); - uncompressedLogo = (uint8*)kernel_args_malloc(uncompressedSize); + uncompressedLogo = (uint8*)malloc(uncompressedSize); if (uncompressedLogo == NULL) return B_NO_MEMORY; @@ -148,7 +148,7 @@ video_display_splash(addr_t frameBuffer) break; default: // 24 bits is assumed here uncompressedSize *= 3; - uncompressedLogo = (uint8*)kernel_args_malloc(uncompressedSize); + uncompressedLogo = (uint8*)malloc(uncompressedSize); if (uncompressedLogo == NULL) return B_NO_MEMORY; @@ -167,7 +167,7 @@ video_display_splash(addr_t frameBuffer) video_blit_image(frameBuffer, uncompressedLogo, width, height, kSplashLogoWidth, x, y); - kernel_args_free(uncompressedLogo); + free(uncompressedLogo); const uint8* lowerHalfIconImage; uncompressedSize = kSplashIconsWidth * kSplashIconsHeight;