diff --git a/ChangeLog b/ChangeLog index c808913a9..8b76b58ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-08-14 Vladimir Serbinenko + + * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and + mbi->cmdline but free playground. + 2009-08-14 Vladimir Serbinenko Handle group offset on UFS1. diff --git a/loader/i386/multiboot.c b/loader/i386/multiboot.c index 87ffcae8d..642530641 100644 --- a/loader/i386/multiboot.c +++ b/loader/i386/multiboot.c @@ -53,7 +53,7 @@ extern grub_dl_t my_mod; static struct grub_multiboot_info *mbi, *mbi_dest; static grub_addr_t entry; -static char *playground; +static char *playground = 0; static grub_size_t code_size; static grub_err_t @@ -68,7 +68,7 @@ grub_multiboot_boot (void) static grub_err_t grub_multiboot_unload (void) { - if (mbi) + if (playground) { unsigned int i; for (i = 0; i < mbi->mods_count; i++) @@ -79,11 +79,11 @@ grub_multiboot_unload (void) ((struct grub_mod_list *) mbi->mods_addr)[i].cmdline); } grub_free ((void *) mbi->mods_addr); - grub_free ((void *) mbi->cmdline); - grub_free (mbi); + grub_free (playground); } - mbi = 0; + mbi = NULL; + playground = NULL; grub_dl_unref (my_mod); return GRUB_ERR_NONE;