aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZhang, Yanmin <yanmin_zhang@linux.intel.com>2010-02-24 22:00:51 -0500
committerIngo Molnar <mingo@elte.hu>2010-02-25 06:15:24 -0500
commit37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab (patch)
treed09142baceaf6b15065b10836532513e52c3378d /tools
parentc2fbaa4b489b738cd9e7666edfeceaaa38e71c9f (diff)
perf symbols: Check the right return variable
In function dso__split_kallsyms(), curr_map saves the return value of map__new2. So check it instead of var map after the call returns. Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: <stable@kernel.org> # for .33.x Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1267066851.1726.9.camel@localhost> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index ee9c37efdd36..320b15178e95 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -527,7 +527,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map,
527 return -1; 527 return -1;
528 528
529 curr_map = map__new2(pos->start, dso, map->type); 529 curr_map = map__new2(pos->start, dso, map->type);
530 if (map == NULL) { 530 if (curr_map == NULL) {
531 dso__delete(dso); 531 dso__delete(dso);
532 return -1; 532 return -1;
533 } 533 }