disk/lvm: Use zalloc to ensure that segments are initialised to sane value.

Reported by: EmanueL Czirai.
This commit is contained in:
Vladimir Serbinenko 2015-02-14 20:31:00 +01:00
parent 8e5bc2f4d3
commit 2ae9457e6e

View file

@ -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++)