1
0
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:
Zdenek Kabelac 2014-06-12 11:38:04 +02:00
parent 3d9737442b
commit eb316fec33

View File

@ -738,9 +738,11 @@ int dm_report_object(struct dm_report *rh, void *object)
}
field->props = fp;
data = _report_get_field_data(rh, fp, object);
if (!data)
if (!(data = _report_get_field_data(rh, fp, object))) {
log_error("dm_report_object: no data for field %s",
rh->fields[fp->field_num].id);
return 0;
}
if (!rh->fields[fp->field_num].report_fn(rh, rh->mem,
field, data,