From 1f54129c4ea4cc88571b75b7d093107985913315 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Wed, 9 Sep 2020 10:22:07 -0500 Subject: [PATCH] integrity: fix segfault reporting integrity for other lvs --- lib/report/report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/report/report.c b/lib/report/report.c index cd7971562..73a150a7e 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -3286,6 +3286,8 @@ static int _raidintegritymode_disp(struct dm_report *rh __attribute__((unused)), lv_get_raid_integrity_settings(lv, &settings); else if (lv_is_integrity(lv)) settings = &first_seg(lv)->integrity_settings; + else + goto out; if (settings->mode[0]) { 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); } } +out: return _field_set_value(field, "", NULL); } -- 2.43.5