From: Arnaldo Carvalho de Melo Date: Tue, 1 Feb 2011 18:18:10 +0000 (-0200) Subject: perf stat: Fix up resource release order X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0015e2e101f5fd3256ab8b5a374c0e8806098871;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf stat: Fix up resource release order That was causing a SEGV on selected old distros. Problem introduced in 7e2ed09. Reported-by: Peter Zijlstra Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index e0f95755361b..806a9998fcd5 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -748,8 +748,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used) out_free_fd: list_for_each_entry(pos, &evsel_list->entries, node) perf_evsel__free_stat_priv(pos); - perf_evlist__delete(evsel_list); -out: perf_evlist__delete_maps(evsel_list); +out: + perf_evlist__delete(evsel_list); return status; }