summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2007-02-14 15:18:31 +0000
committerAlasdair Kergon <agk@redhat.com>2007-02-14 15:18:31 +0000
commit0558b9284ee2350c5aa6d5f865a620256d826e5e (patch)
treed38f5667115a47b99936a92f8fea67d6660bbc2b /tools
parent012869d6d2a93a38bd8f4be07cf261c088fd810e (diff)
downloadlvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.tar.gz
lvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.tar.xz
lvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.zip
Fix a leak in a reporting error path.
Diffstat (limited to 'tools')
-rw-r--r--tools/reporter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/reporter.c b/tools/reporter.c
index dd27c271..bdf4adfa 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -286,7 +286,7 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
if (!(report_handle = report_init(cmd, options, keys, &report_type,
separator, aligned, buffered,
headings)))
- return 0;
+ return_0;
/* Ensure options selected are compatible */
if (report_type & SEGS)
@@ -295,6 +295,7 @@ static int _report(struct cmd_context *cmd, int argc, char **argv,
report_type |= PVS;
if ((report_type & LVS) && (report_type & PVS)) {
log_error("Can't report LV and PV fields at the same time");
+ dm_report_free(report_handle);
return 0;
}