* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string.

This commit is contained in:
Seth Goldberg 2011-03-26 23:22:59 +01:00 committed by Vladimir 'phcoder' Serbinenko
parent 5ee04984d1
commit c482ad98b3
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-03-26 Seth Goldberg <seth.goldberg@oracle.com>
* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't
return freed string.
2011-03-26 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label.

View file

@ -184,7 +184,7 @@ find_root_device_from_mountinfo (const char *dir)
static char *
find_root_device_from_libzfs (const char *dir)
{
char *device;
char *device = NULL;
char *poolname;
char *poolfs;
@ -225,7 +225,10 @@ find_root_device_from_libzfs (const char *dir)
struct stat st;
if (stat (device, &st) == 0)
break;
{
device = xstrdup (device);
break;
}
device = NULL;
}