Skip to content

Commit 25870ed

Browse files
Manciukicsmb49
authored andcommitted
perf symbol-elf: Fix memory leak by freeing sdt_note.args
BugLink: https://bugs.launchpad.net/bugs/1944610 commit 69c9ffe upstream. 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> Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent fb045c0 commit 25870ed

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/util/symbol-elf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes)
23932393

23942394
list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) {
23952395
list_del_init(&pos->note_list);
2396+
zfree(&pos->args);
23962397
zfree(&pos->name);
23972398
zfree(&pos->provider);
23982399
free(pos);

0 commit comments

Comments
 (0)