Skip to content

Commit

Permalink
perf symbols: Check the right return variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang, Yanmin authored and Ingo Molnar committed Feb 25, 2010
1 parent c2fbaa4 commit 37fe5fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,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;
}
Expand Down

0 comments on commit 37fe5fc

Please sign in to comment.