1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

report: Do not try to get dev_size of a NULL device.

This commit is contained in:
Petr Rockai 2014-01-13 11:45:18 +01:00
parent 5f7286f15d
commit d61c9eb52f

View File

@ -695,6 +695,9 @@ static int _devsize_disp(struct dm_report *rh, struct dm_pool *mem,
{ {
uint64_t size; uint64_t size;
if (!data)
return _field_set_value(field, "", NULL);
if (!dev_get_size(*(const struct device **) data, &size)) if (!dev_get_size(*(const struct device **) data, &size))
return_0; return_0;