From 32df278c7ab9586e66f5f43b312ce1fe7207d850 Mon Sep 17 00:00:00 2001 From: longpanda Date: Mon, 12 Oct 2026 14:37:51 +0800 Subject: [PATCH] Add check before pointer free. --- GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gfxmenu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gfxmenu.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gfxmenu.c index 1e2d4e5a..1b2d5c09 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gfxmenu.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gfxmenu.c @@ -45,7 +45,7 @@ extern int g_ventoy_menu_refresh; static grub_gfxmenu_view_t cached_view; -static void +static void grub_gfxmenu_viewer_fini (void *data __attribute__ ((unused))) { } @@ -102,7 +102,9 @@ grub_gfxmenu_try (int entry, grub_menu_t menu, int nested) mode_info.width, mode_info.height); } - grub_free (full_theme_path); + + if (full_theme_path) + grub_free (full_theme_path); if (! cached_view) {