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:
parent
5f7286f15d
commit
d61c9eb52f
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user