From 0d9f3dbd954b04e08a27154376b60fe9aca23b0c Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 18 Sep 2021 23:16:30 +0200 Subject: [PATCH] clang: add explicit test for VG Clang can't figure out connection to 'skip' variable. --- tools/toollib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toollib.c b/tools/toollib.c index 562cad06a..fa3b2ffe3 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -4349,7 +4349,7 @@ static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t read_flags, if (ret > ret_max) ret_max = ret; - if (!skip) + if (!skip && vg) unlock_vg(cmd, vg, vg->name); endvg: if (error_vg)