diff options
author | Zhang, Yanmin <yanmin_zhang@linux.intel.com> | 2010-02-25 11:00:51 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-15 09:06:12 -0700 |
commit | 5f376564288d2b6959bdd8bf5442872cb97c7ac1 (patch) | |
tree | 57df30e3b8daecbfe0a7589522fddb9bb7f74197 /tools | |
parent | 00faf75b763d765c9360b5be47d47f190d53f32a (diff) | |
download | lwn-5f376564288d2b6959bdd8bf5442872cb97c7ac1.tar.gz lwn-5f376564288d2b6959bdd8bf5442872cb97c7ac1.zip |
perf symbols: Check the right return variable
commit 37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab upstream.
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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index ab92763edb03..72547b914ad2 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -503,7 +503,7 @@ static int dso__split_kallsyms(struct dso *self, struct map *map, return -1; curr_map = map__new2(pos->start, dso, map->type); - if (map == NULL) { + if (curr_map == NULL) { dso__delete(dso); return -1; } |