summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorRiccardo Mancini <rickyman7@gmail.com>2021-06-03 00:08:33 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-06-04 10:06:27 -0300
commit69c9ffed6cede9c11697861f654946e3ae95a930 (patch)
treefcf5d88a2a7399c1c7f23799ea3f5d5b2a997339 /tools/perf
parent3cc84399e9b60463bc39cf352ffd8bccb92e02bd (diff)
perf symbol-elf: Fix memory leak by freeing sdt_note.args
Reported by ASan. Signed-off-by: Riccardo Mancini <rickyman7@gmail.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Fabian Hemmer <copy@copy.sh> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Remi Bernon <rbernon@codeweavers.com> Cc: Jiri Slaby <jirislaby@kernel.org> Link: http://lore.kernel.org/lkml/20210602220833.285226-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/symbol-elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 4c56aa837434..a73345730ba9 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -2412,6 +2412,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes)
list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) {
list_del_init(&pos->note_list);
+ zfree(&pos->args);
zfree(&pos->name);
zfree(&pos->provider);
free(pos);