aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRamkumar Ramachandra2014-03-27 18:50:19 -0500
committerJiri Olsa2014-04-14 05:55:53 -0500
commit5673872d4afd2584e075cf2b1adb2cccec46a0f3 (patch)
treefe0e946ecbcc3747e75413b22a1e24687c9d4bbc /tools
parent95a2b3c0a9e2a8038edbf3f9776d5a3d76146459 (diff)
downloadlinux-phy-5673872d4afd2584e075cf2b1adb2cccec46a0f3.tar.gz
linux-phy-5673872d4afd2584e075cf2b1adb2cccec46a0f3.tar.xz
linux-phy-5673872d4afd2584e075cf2b1adb2cccec46a0f3.zip
perf bench: Fix segfault at the end of an 'all' execution
At the end of $ perf bench all the program segfaults because it attempts to dereference a NULL pointer. Fix this fault. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1395964219-22173-4-git-send-email-artagnon@gmail.com Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-bench.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index f600b74216da..1e6e77710545 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -86,7 +86,7 @@ static struct collection collections[] = {
86 86
87/* Iterate over all benchmarks within a collection: */ 87/* Iterate over all benchmarks within a collection: */
88#define for_each_bench(coll, bench) \ 88#define for_each_bench(coll, bench) \
89 for (bench = coll->benchmarks; bench->name; bench++) 89 for (bench = coll->benchmarks; bench && bench->name; bench++)
90 90
91static void dump_benchmarks(struct collection *coll) 91static void dump_benchmarks(struct collection *coll)
92{ 92{