[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1385994980-19821-1-git-send-email-stfomichev@yandex-team.ru>
Date: Mon, 2 Dec 2013 18:36:20 +0400
From: Stanislav Fomichev <stfomichev@...dex-team.ru>
To: linux-kernel@...r.kernel.org
Cc: a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
acme@...stprotocols.net, dsahern@...il.com, jolsa@...hat.com,
namhyung@...nel.org, adrian.hunter@...el.com
Subject: [PATCH] perf util: free cpu_map in perf_session__cpu_bitmap
Free previously allocated map.
Signed-off-by: Stanislav Fomichev <stfomichev@...dex-team.ru>
---
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 4ce146bae552..ee717ee9ca3a 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1606,6 +1606,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;
@@ -1613,6 +1614,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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists