提交 76421a96 编写于 作者: R Riccardo Mancini 提交者: Zheng Zengkai

perf symbol-elf: Fix memory leak by freeing sdt_note.args

mainline inclusion
from mainline-5.13-rc4
commit 69c9ffed
category: bugfix
bugzilla: 78200
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=69c9ffed6cede9c11697861f654946e3ae95a930

---------------------------

Reported by ASan.
Signed-off-by: NRiccardo Mancini <rickyman7@gmail.com>
Acked-by: NIan 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: NYang Jihong <yangjihong1@huawei.com>
Reviewed-by: NKuohai Xu <xukuohai@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 245506ad
...@@ -2360,6 +2360,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes) ...@@ -2360,6 +2360,7 @@ int cleanup_sdt_note_list(struct list_head *sdt_notes)
list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) { list_for_each_entry_safe(pos, tmp, sdt_notes, note_list) {
list_del_init(&pos->note_list); list_del_init(&pos->note_list);
zfree(&pos->args);
zfree(&pos->name); zfree(&pos->name);
zfree(&pos->provider); zfree(&pos->provider);
free(pos); free(pos);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册