summaryrefslogtreecommitdiffstats
path: root/tools/pvchange.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pvchange.c')
-rw-r--r--tools/pvchange.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c
index 1c9d3944..efc780b6 100644
--- a/tools/pvchange.c
+++ b/tools/pvchange.c
@@ -58,8 +58,10 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
log_verbose("Finding volume group %s of physical volume %s",
vg_name, pv_name);
vg = vg_read_for_update(cmd, vg_name, NULL, 0);
- if (vg_read_error(vg))
+ if (vg_read_error(vg)) {
+ vg_release(vg);
return_0;
+ }
if (!(pvl = find_pv_in_vg(vg, pv_name))) {
log_error