]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Fri, 14 Aug 2009 15:15:33 +0000 (15:15 +0000)
committerphcoder <phcoder@localhost>
Fri, 14 Aug 2009 15:15:33 +0000 (15:15 +0000)
* loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
mbi->cmdline but free playground.

ChangeLog
loader/i386/multiboot.c

index c808913a9dbde0478c381baf4d3b271f16889332..8b76b58ea9d4c19fee55698490ab029c3d977a94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
+       mbi->cmdline but free playground.
+
 2009-08-14  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Handle group offset on UFS1.
index 87ffcae8d7027d106d6a8d7751137673b875b205..642530641f3ea8442e2763bbbb64dbe793355dcf 100644 (file)
@@ -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;