summaryrefslogtreecommitdiffstats
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
parent012869d6d2a93a38bd8f4be07cf261c088fd810e (diff)
downloadlvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.tar.gz
lvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.tar.xz
lvm2-0558b9284ee2350c5aa6d5f865a620256d826e5e.zip
Fix a leak in a reporting error path.
-rw-r--r--WHATS_NEW1
-rw-r--r--tools/reporter.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index b7fc22b1..e7a291f9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.23 -
====================================
+ Fix a leak in a reporting error path (2.02.19).
Version 2.02.22 - 13th February 2007
====================================
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;
}