Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287655

[PATCH 07/11] perf tools: Fix write_numa_topology to put cpu_map instead of free

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 07/11] perf tools: Fix write_numa_topology to put cpu_map instead of free
Date 2015-12-09 18:00 +0100
Message-ID <qDQfX-2uA-65@gated-at.bofh.it> (permalink)
References <qDQfU-2uA-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Fix write_numa_topology to put cpu_map instead of free because cpu_map
is managed based on refcnt.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20151209021135.10245.79046.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
 
-- 
2.1.0

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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
  [PATCH 11/11] perf tools: Move cmd_version() to builtin-version.c Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
  [PATCH 10/11] perf tools: Save cmdline arguments earlier Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
  [PATCH 07/11] perf tools: Fix write_numa_topology to put cpu_map instead of free Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-09 18:00 +0100
  Re: [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-12-10 09:20 +0100

csiph-web