From: Masami Hiramatsu Date: Wed, 9 Dec 2015 02:11:35 +0000 (+0900) Subject: perf tools: Fix write_numa_topology to put cpu_map instead of free X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5191d887681dd34ba3993a438d5746378952885a;p=linux-beck.git perf tools: Fix write_numa_topology to put cpu_map instead of free Fix write_numa_topology to put cpu_map instead of free because cpu_map is managed based on refcnt. Signed-off-by: Masami Hiramatsu Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20151209021135.10245.79046.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 43838003c1a1..5ac7bdb0dff7 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -724,7 +724,7 @@ static int write_numa_topology(int fd, struct perf_header *h __maybe_unused, done: free(buf); fclose(fp); - free(node_map); + cpu_map__put(node_map); return ret; }