1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

integrity: fix segfault reporting integrity for other lvs

This commit is contained in:
David Teigland 2020-09-09 10:22:07 -05:00
parent 0210c7076d
commit 1f54129c4e

View File

@ -3286,6 +3286,8 @@ static int _raidintegritymode_disp(struct dm_report *rh __attribute__((unused)),
lv_get_raid_integrity_settings(lv, &settings); lv_get_raid_integrity_settings(lv, &settings);
else if (lv_is_integrity(lv)) else if (lv_is_integrity(lv))
settings = &first_seg(lv)->integrity_settings; settings = &first_seg(lv)->integrity_settings;
else
goto out;
if (settings->mode[0]) { if (settings->mode[0]) {
if (settings->mode[0] == 'B') if (settings->mode[0] == 'B')
@ -3301,6 +3303,7 @@ static int _raidintegritymode_disp(struct dm_report *rh __attribute__((unused)),
return _field_set_value(field, repstr, NULL); return _field_set_value(field, repstr, NULL);
} }
} }
out:
return _field_set_value(field, "", NULL); return _field_set_value(field, "", NULL);
} }