linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf symbol-elf: fix memory leak: free sdt_note.args
@ 2021-06-02 22:08 Riccardo Mancini
  2021-06-04  4:08 ` Ian Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Riccardo Mancini @ 2021-06-02 22:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Namhyung Kim, Ian Rogers
  Cc: Riccardo Mancini, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Fabian Hemmer, Remi Bernon,
	Jiri Slaby, linux-perf-users, linux-kernel

Reported by ASan.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
---
 tools/perf/util/symbol-elf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 4c56aa8374344..a73345730ba90 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);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-04 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 22:08 [PATCH] perf symbol-elf: fix memory leak: free sdt_note.args Riccardo Mancini
2021-06-04  4:08 ` Ian Rogers
2021-06-04 13:00   ` Arnaldo Carvalho de Melo
2021-06-04 15:23     ` Riccardo Mancini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).