2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
* disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when there is no memory left for physical volume name.
This commit is contained in:
parent
0a1150e26b
commit
01979850ed
2 changed files with 9 additions and 0 deletions
|
@ -477,7 +477,11 @@ grub_lvm_scan_device (const char *name)
|
|||
q++;
|
||||
|
||||
s = q - p;
|
||||
|
||||
pvname = grub_malloc (s + 1);
|
||||
if (pvname == NULL)
|
||||
goto lvs_segment_fail2;
|
||||
|
||||
grub_memcpy (pvname, p, s);
|
||||
pvname[s] = '\0';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue