diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-27 17:03:38 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-28 00:49:28 +0200 |
commit | a4eb378fe41218793f4c7e97b0d82d33643b5a67 (patch) | |
tree | 04bd6e8512cf06cb6c9ee2d8816c00b1910b500a | |
parent | f4b49dae1eb982e36e748fa8e1fc2af59025c9c7 (diff) | |
download | lvm2-a4eb378fe41218793f4c7e97b0d82d33643b5a67.tar.gz |
cov: add explicit check for vg existence
Since we check !vg - add check before accessing ->status.
-rw-r--r-- | lib/format_text/format-text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 26e55cec4..0441342a1 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -454,7 +454,7 @@ static struct volume_group *_vg_read_raw_area(struct cmd_context *cmd, (unsigned long long)rlocn->size, vgname); - if (precommitted) + if (vg && precommitted) vg->status |= PRECOMMITTED; out: |