]> sourceware.org Git - lvm2.git/commitdiff
integrity: fix segfault reporting integrity for other lvs
authorDavid Teigland <teigland@redhat.com>
Wed, 9 Sep 2020 15:22:07 +0000 (10:22 -0500)
committerDavid Teigland <teigland@redhat.com>
Wed, 9 Sep 2020 15:22:07 +0000 (10:22 -0500)
lib/report/report.c

index cd797156224b65ba406899a6a6ba5199f161a559..73a150a7e6e48864e796380b1b56f1f0fe7fe61d 100644 (file)
@@ -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);
 }
 
This page took 0.043542 seconds and 5 git commands to generate.