aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/svghelper.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2013-12-27 14:55:14 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-12-27 15:08:19 -0500
commit74cf249d5cf7de84c88cca69a2f13b13d500ff94 (patch)
treefc61aabd22d981e95fe6ffe9a839e07bbb1f95a0 /tools/perf/util/svghelper.c
parent046625231a0397f1776eb353a4ec9ff142cd2f6b (diff)
perf tools: Use zfree to help detect use after free bugs
Several areas already used this technique, so do some audit to consistently use it elsewhere. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-9sbere0kkplwe45ak6rk4a1f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/svghelper.c')
-rw-r--r--tools/perf/util/svghelper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c
index 56a84f2cc46d..43262b83c541 100644
--- a/tools/perf/util/svghelper.c
+++ b/tools/perf/util/svghelper.c
@@ -21,6 +21,7 @@
21 21
22#include "perf.h" 22#include "perf.h"
23#include "svghelper.h" 23#include "svghelper.h"
24#include "util.h"
24#include "cpumap.h" 25#include "cpumap.h"
25 26
26static u64 first_time, last_time; 27static u64 first_time, last_time;
@@ -708,8 +709,8 @@ int svg_build_topology_map(char *sib_core, int sib_core_nr,
708 return 0; 709 return 0;
709 710
710exit: 711exit:
711 free(t.sib_core); 712 zfree(&t.sib_core);
712 free(t.sib_thr); 713 zfree(&t.sib_thr);
713 714
714 return -1; 715 return -1;
715} 716}