mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf bpf: Add missing free to bpf_event__print_bpf_prog_info()
[ Upstream commit 88c42f4d6cb249eb68524282f8d4cc32f9059984 ]
If btf__new() is called then there needs to be a corresponding btf__free().
Fixes: f8dfeae009 ("perf bpf: Show more BPF program info in print_bpf_prog_info()")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Fastabend <[email protected]>
Cc: KP Singh <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Martin KaFai Lau <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tiezhu Yang <[email protected]>
Cc: Yonghong Song <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
23def86bbf
commit
bdf94057aa
1 changed files with 3 additions and 1 deletions
|
|
@ -467,7 +467,7 @@ void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
|
|||
synthesize_bpf_prog_name(name, KSYM_NAME_LEN, info, btf, 0);
|
||||
fprintf(fp, "# bpf_prog_info %u: %s addr 0x%llx size %u\n",
|
||||
info->id, name, prog_addrs[0], prog_lens[0]);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
fprintf(fp, "# bpf_prog_info %u:\n", info->id);
|
||||
|
|
@ -477,4 +477,6 @@ void bpf_event__print_bpf_prog_info(struct bpf_prog_info *info,
|
|||
fprintf(fp, "# \tsub_prog %u: %s addr 0x%llx size %u\n",
|
||||
i, name, prog_addrs[i], prog_lens[i]);
|
||||
}
|
||||
out:
|
||||
btf__free(btf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue