disk/lvm: Use zalloc to ensure that segments are initialised to sane value.
Reported by: EmanueL Czirai.
This commit is contained in:
parent
8e5bc2f4d3
commit
2ae9457e6e
1 changed files with 1 additions and 1 deletions
|
@ -426,7 +426,7 @@ grub_lvm_detect (grub_disk_t disk,
|
|||
#endif
|
||||
goto lvs_fail;
|
||||
}
|
||||
lv->segments = grub_malloc (sizeof (*seg) * lv->segment_count);
|
||||
lv->segments = grub_zalloc (sizeof (*seg) * lv->segment_count);
|
||||
seg = lv->segments;
|
||||
|
||||
for (i = 0; i < lv->segment_count; i++)
|
||||
|
|
Loading…
Reference in a new issue