From 37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab Mon Sep 17 00:00:00 2001 From: "Zhang, Yanmin" Date: Thu, 25 Feb 2010 11:00:51 +0800 Subject: [PATCH] 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 Acked-by: David S. Miller Cc: # for .33.x Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <1267066851.1726.9.camel@localhost> Signed-off-by: Ingo Molnar --- tools/perf/util/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, return -1; curr_map = map__new2(pos->start, dso, map->type); - if (map == NULL) { + if (curr_map == NULL) { dso__delete(dso); return -1; } -- GitLab