diff options
author | Milan Broz <mbroz@redhat.com> | 2009-11-24 17:07:09 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2009-11-24 17:07:09 +0000 |
commit | fed0e904f2f678422767ba4b0b018751611ad7b3 (patch) | |
tree | 9248c523e06d2647e0cbbe8e93f2688df89a6a6a /tools/pvdisplay.c | |
parent | 0025670dc9b9e705dda1e3b56d8c5a424835cb10 (diff) | |
download | lvm2-fed0e904f2f678422767ba4b0b018751611ad7b3.tar.gz |
Add missing vg_release to pvs and pvdisplay to fix memory leak.
Diffstat (limited to 'tools/pvdisplay.c')
-rw-r--r-- | tools/pvdisplay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/pvdisplay.c b/tools/pvdisplay.c index 531f37a79..47def172a 100644 --- a/tools/pvdisplay.c +++ b/tools/pvdisplay.c @@ -31,10 +31,11 @@ static int _pvdisplay_single(struct cmd_context *cmd, vg_name = pv_vg_name(pv); vg = vg_read(cmd, vg_name, (char *)&pv->vgid, 0); if (vg_read_error(vg)) { - log_error("Skipping volume group %s", vg_name); + log_error("Skipping volume group %s", vg_name); + vg_release(vg); /* FIXME If CLUSTERED should return ECMD_PROCESSED here */ - return ECMD_FAILED; - } + return ECMD_FAILED; + } /* * Replace possibly incomplete PV structure with new one |