mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: dm_report_object report error for no data
NULL data would cause problems....
This commit is contained in:
parent
3d9737442b
commit
eb316fec33
@ -738,9 +738,11 @@ int dm_report_object(struct dm_report *rh, void *object)
|
|||||||
}
|
}
|
||||||
field->props = fp;
|
field->props = fp;
|
||||||
|
|
||||||
data = _report_get_field_data(rh, fp, object);
|
if (!(data = _report_get_field_data(rh, fp, object))) {
|
||||||
if (!data)
|
log_error("dm_report_object: no data for field %s",
|
||||||
|
rh->fields[fp->field_num].id);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!rh->fields[fp->field_num].report_fn(rh, rh->mem,
|
if (!rh->fields[fp->field_num].report_fn(rh, rh->mem,
|
||||||
field, data,
|
field, data,
|
||||||
|
Loading…
Reference in New Issue
Block a user