2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>

* loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Free the
	right pointer.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-06 17:25:40 +01:00
parent 8f9a632b96
commit 2ac227c7f4
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-03-06 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Free the
right pointer.
2010-03-05 Vladimir Serbinenko <phcoder@gmail.com>
Fix FreeBSD compilation.

View File

@ -448,8 +448,8 @@ grub_multiboot_set_bootdev (void)
dev = grub_device_open (0);
if (dev && dev->disk && dev->disk->partition)
{
p = dev->disk->partition->partmap->get_name (dev->disk->partition);
char *p0;
p = p0 = dev->disk->partition->partmap->get_name (dev->disk->partition);
if (p)
{
if ((p[0] >= '0') && (p[0] <= '9'))
@ -463,7 +463,7 @@ grub_multiboot_set_bootdev (void)
if ((p[0] >= 'a') && (p[0] <= 'z'))
part = p[0] - 'a';
}
grub_free (p);
grub_free (p0);
}
if (dev)
grub_device_close (dev);