]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw()
authorLi Huafei <lihuafei1@huawei.com>
Sat, 19 Oct 2024 15:41:57 +0000 (23:41 +0800)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 23 Oct 2024 22:36:14 +0000 (15:36 -0700)
commit150dab31d5609f896fbfaa06b442ca314da79858
tree69bf086dc7aaf7789073374d0b17e92e621a5721
parent908d50e50ef91713ae94bc8988db87def6b6fec3
perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw()

In symbol__disassemble_raw(), the created disasm_line should be
discarded before returning an error. When creating disasm_line fails,
break the loop and then release the created lines.

Fixes: 0b971e6bf1c3 ("perf annotate: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility")
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-3-lihuafei1@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/disasm.c