[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1267066851.1726.9.camel@localhost>
Date: Thu, 25 Feb 2010 11:00:51 +0800
From: "Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
LKML <linux-kernel@...r.kernel.org>
Subject: 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 calling returns.
Signed-off-by: Zhang Yanmin <yanmin_zhang@...ux.intel.com>
---
diff -Nraup linux-2.6.33/tools/perf/util/symbol.c linux-2.6.33_perf/tools/perf/util/symbol.c
--- linux-2.6.33/tools/perf/util/symbol.c 2010-02-25 02:52:17.000000000 +0800
+++ linux-2.6.33_perf/tools/perf/util/symbol.c 2010-02-25 10:12:33.000000000 +0800
@@ -503,7 +503,7 @@ static int dso__split_kallsyms(struct ds
return -1;
curr_map = map__new2(pos->start, dso, map->type);
- if (map == NULL) {
+ if (curr_map == NULL) {
dso__delete(dso);
return -1;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists