summaryrefslogtreecommitdiff
path: root/lib/format_text
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-07-27 17:03:38 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-07-28 00:49:28 +0200
commita4eb378fe41218793f4c7e97b0d82d33643b5a67 (patch)
tree04bd6e8512cf06cb6c9ee2d8816c00b1910b500a /lib/format_text
parentf4b49dae1eb982e36e748fa8e1fc2af59025c9c7 (diff)
downloadlvm2-a4eb378fe41218793f4c7e97b0d82d33643b5a67.tar.gz
cov: add explicit check for vg existence
Since we check !vg - add check before accessing ->status.
Diffstat (limited to 'lib/format_text')
-rw-r--r--lib/format_text/format-text.c2
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: