[tip:perf/core] perf symbols: Fix error path on symbol__init()

From: tip-bot for Namhyung Kim
Date: Wed Dec 21 2011 - 03:45:04 EST


Commit-ID: d74c896b7e3250a07f7d0315eecdd2ae1a7bc3c3
Gitweb: http://git.kernel.org/tip/d74c896b7e3250a07f7d0315eecdd2ae1a7bc3c3
Author: Namhyung Kim <namhyung@xxxxxxxxx>
AuthorDate: Tue, 13 Dec 2011 00:16:52 +0900
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 20 Dec 2011 13:40:27 -0200

perf symbols: Fix error path on symbol__init()

The order of freeing comm_list and dso_list should be reversed.

Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/r/1323703017-6060-4-git-send-email-namhyung@xxxxxxxxx
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index e54b13d..215d50f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -2604,10 +2604,10 @@ int symbol__init(void)
symbol_conf.initialized = true;
return 0;

-out_free_dso_list:
- strlist__delete(symbol_conf.dso_list);
out_free_comm_list:
strlist__delete(symbol_conf.comm_list);
+out_free_dso_list:
+ strlist__delete(symbol_conf.dso_list);
return -1;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/