Skip to content

Commit 150dab3

Browse files
Li Huafeinamhyung
authored andcommitted
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: 0b971e6 ("perf annotate: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility") Signed-off-by: Li Huafei <[email protected]> Tested-by: Athira Rajeev <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 908d50e commit 150dab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/util/disasm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ static int symbol__disassemble_raw(char *filename, struct symbol *sym,
17731773
sprintf(args->line, "%x", line[i]);
17741774
dl = disasm_line__new(args);
17751775
if (dl == NULL)
1776-
goto err;
1776+
break;
17771777

17781778
annotation_line__add(&dl->al, &notes->src->source);
17791779
offset += 4;

0 commit comments

Comments
 (0)