2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Thu, 23 Jun 2005 08:12:19 +0000 (08:12 +0000)
committerokuji <okuji@localhost>
Thu, 23 Jun 2005 08:12:19 +0000 (08:12 +0000)
        * kern/mm.c (grub_free): If the next free block which is being
        merged is the first free block, set the first block to the block
        being freed.
        Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.

ChangeLog
THANKS
kern/mm.c

index b0fb82f..1f5f80d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * kern/mm.c (grub_free): If the next free block which is being
+       merged is the first free block, set the first block to the block
+       being freed.
+       Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
+
 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
 
        * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
diff --git a/THANKS b/THANKS
index b1871d1..4209aa6 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -16,6 +16,7 @@ Robert Bihlmeyer <robbe@orcus.priv.at>
 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
 Tomas Ebenlendr <ebik@ucw.cz>
 Tsuneyoshi Yasuo <tuneyoshi@naic.co.jp>
+Vincent Guffens <guffens@inma.ucl.ac.be>
 Vincent Pelletier <subdino2004@yahoo.fr>
 
 Also, we thank the projects GNU Automake and LZO. Some code
index 035f93d..f27c3bc 100644 (file)
--- a/kern/mm.c
+++ b/kern/mm.c
@@ -295,6 +295,9 @@ grub_free (void *ptr)
       
       if (p + p->size == p->next)
        {
+         if (p->next == q)
+           q = p;
+
          p->next->magic = 0;
          p->size += p->next->size;
          p->next = p->next->next;