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>.
This commit is contained in:
okuji 2005-06-23 08:12:19 +00:00
parent 89371b203b
commit 50b5a0a793
3 changed files with 11 additions and 0 deletions

View file

@ -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;