* kern/emu/getroot.c (grub_util_get_grub_dev): Use xasprintf.
This commit is contained in:
parent
efc9d7f175
commit
b26f1c1160
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2010-07-20 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* kern/emu/getroot.c (grub_util_get_grub_dev): Use xasprintf.
|
||||
|
||||
2010-07-20 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* disk/loopback.c (grub_cmd_loopback): Don't leak a grub_file_t
|
||||
|
|
|
@ -695,7 +695,7 @@ grub_util_get_grub_dev (const char *os_dev)
|
|||
if (q)
|
||||
*q = ',';
|
||||
|
||||
asprintf (&grub_dev, "md/%s", p);
|
||||
grub_dev = xasprintf ("md/%s", p);
|
||||
free (p);
|
||||
}
|
||||
else
|
||||
|
@ -708,7 +708,7 @@ grub_util_get_grub_dev (const char *os_dev)
|
|||
if (mdadm_name)
|
||||
{
|
||||
free (grub_dev);
|
||||
asprintf (&grub_dev, "md/%s", mdadm_name);
|
||||
grub_dev = xasprintf ("md/%s", mdadm_name);
|
||||
free (mdadm_name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue