[PATCH 3/8] perf tools: free aliases[j] in pmu.c if name_only is true.

From: Dongsheng Yang
Date: Sun Dec 29 2013 - 21:36:31 EST


Signed-off-by: Dongsheng Yang <yangds.fnst@xxxxxxxxxxxxxx>
---
tools/perf/util/pmu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 331dc2c..169c480 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -752,6 +752,7 @@ unsigned int print_pmu_events(const char *event_glob, bool name_only)
for (j = 0; j < len; j++) {
if (name_only) {
printf("%s ", aliases[j]);
+ zfree(&aliases[j]);
count++;
continue;
}
--
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/