* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string.
This commit is contained in:
parent
5ee04984d1
commit
c482ad98b3
2 changed files with 10 additions and 2 deletions
|
@ -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>
|
2011-03-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label.
|
* grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label.
|
||||||
|
|
|
@ -184,7 +184,7 @@ find_root_device_from_mountinfo (const char *dir)
|
||||||
static char *
|
static char *
|
||||||
find_root_device_from_libzfs (const char *dir)
|
find_root_device_from_libzfs (const char *dir)
|
||||||
{
|
{
|
||||||
char *device;
|
char *device = NULL;
|
||||||
char *poolname;
|
char *poolname;
|
||||||
char *poolfs;
|
char *poolfs;
|
||||||
|
|
||||||
|
@ -225,7 +225,10 @@ find_root_device_from_libzfs (const char *dir)
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (stat (device, &st) == 0)
|
if (stat (device, &st) == 0)
|
||||||
break;
|
{
|
||||||
|
device = xstrdup (device);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
device = NULL;
|
device = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue