diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2009-12-11 13:11:56 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2009-12-11 13:11:56 +0000 |
commit | 685be1dc7a58b74b2168cf682be0f1580edd2ceb (patch) | |
tree | 075aaec141827e086fe4454b066ec1ffb5941464 /tools/pvresize.c | |
parent | c8d8f74188574b8819a86e34f35b3c58e35f8bc6 (diff) | |
download | lvm2-685be1dc7a58b74b2168cf682be0f1580edd2ceb.tar.gz lvm2-685be1dc7a58b74b2168cf682be0f1580edd2ceb.tar.xz lvm2-685be1dc7a58b74b2168cf682be0f1580edd2ceb.zip |
Fix unlocking vg in some pvresize and toollib error paths.
Diffstat (limited to 'tools/pvresize.c')
-rw-r--r-- | tools/pvresize.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/pvresize.c b/tools/pvresize.c index 7a911ac8..292e3cc1 100644 --- a/tools/pvresize.c +++ b/tools/pvresize.c @@ -60,8 +60,12 @@ static int _pv_resize_single(struct cmd_context *cmd, vg = vg_read_for_update(cmd, vg_name, NULL, 0); - if (vg_read_error(vg)) - goto bad; + if (vg_read_error(vg)) { + vg_release(vg); + log_error("Unable to read volume group \"%s\".", + vg_name); + return 0; + } if (!(pvl = find_pv_in_vg(vg, pv_name))) { log_error("Unable to find \"%s\" in volume group \"%s\"", |