diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-10-18 14:32:56 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-10-19 15:32:21 +0200 |
commit | c7c53ad41d5521d5b431e799699c9ad6a07054a4 (patch) | |
tree | 8f5a88fd7604145f18a3ac438a6297b02100b052 /tools/pvcreate.c | |
parent | 0e47639a44e1630250ea10643f5a440281edfdce (diff) | |
download | lvm2-c7c53ad41d5521d5b431e799699c9ad6a07054a4.tar.gz |
pvcreate: fix leak on error path
Missing vg release on error path.
Add tests for few more error cases.
Diffstat (limited to 'tools/pvcreate.c')
-rw-r--r-- | tools/pvcreate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/pvcreate.c b/tools/pvcreate.c index 5c12acbc1..c75f5619b 100644 --- a/tools/pvcreate.c +++ b/tools/pvcreate.c @@ -68,6 +68,7 @@ static int pvcreate_restore_params_validate(struct cmd_context *cmd, return 0; } if (!(existing_pvl = find_pv_in_vg_by_uuid(vg, pp->idp))) { + release_vg(vg); log_error("Can't find uuid %s in backup file %s", uuid, pp->restorefile); return 0; |