From a4eb378fe41218793f4c7e97b0d82d33643b5a67 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 27 Jul 2021 17:03:38 +0200 Subject: [PATCH] cov: add explicit check for vg existence Since we check !vg - add check before accessing ->status. --- lib/format_text/format-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: