]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf disasm: Use disasm_line__free() to properly free disasm_line
authorLi Huafei <lihuafei1@huawei.com>
Sat, 19 Oct 2024 15:41:55 +0000 (23:41 +0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 23 Oct 2024 22:35:38 +0000 (15:35 -0700)
commitb4e0e9a1e30059f4523c9b6a1f8045ad89b5db8a
tree406588225ebeb6df091d103501654b14f29a25f5
parent36fae9f93e5f00eb3e410784ce99a4d7503aa12e
perf disasm: Use disasm_line__free() to properly free disasm_line

The structure disasm_line contains members that require dynamically
allocated memory and need to be freed correctly using
disasm_line__free().

This patch fixes the incorrect release in
symbol__disassemble_capstone().

Fixes: 6d17edc113de ("perf annotate: Use libcapstone to disassemble")
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Tested-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: sesse@google.com
Cc: kjain@linux.ibm.com
Link: https://lore.kernel.org/r/20241019154157.282038-1-lihuafei1@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/disasm.c