[PATCH 2/3] perf util: free cpu_map in perf_session__cpu_bitmap

From: Stanislav Fomichev
Date: Mon Jan 20 2014 - 06:40:29 EST


Signed-off-by: Stanislav Fomichev <stfomichev@xxxxxxxxxxxxxx>
---
tools/perf/util/session.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 7acc03e8f3b2..03815af30b16 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1600,6 +1600,7 @@ int perf_session__cpu_bitmap(struct perf_session *session,
int cpu = map->map[i];

if (cpu >= MAX_NR_CPUS) {
+ cpu_map__delete(map);
pr_err("Requested CPU %d too large. "
"Consider raising MAX_NR_CPUS\n", cpu);
return -1;
@@ -1607,6 +1608,7 @@ int perf_session__cpu_bitmap(struct perf_session *session,

set_bit(cpu, cpu_bitmap);
}
+ cpu_map__delete(map);

return 0;
}
--
1.8.3.2

--
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/