[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YYbRcJCx4J2pP1UO@kernel.org>
Date: Sat, 6 Nov 2021 16:03:12 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Song Liu <songliubraving@...com>, linux-kernel@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
linux-perf-users@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org, Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/2] perf bpf: Add missing free to
bpf_event__print_bpf_prog_info
Em Fri, Nov 05, 2021 at 10:37:33PM -0700, Ian Rogers escreveu:
> If btf__new is called then there needs to be a corresponding btf__free.
Thanks, applied.
- Arnaldo
> Fixes: f8dfeae009ef ("perf bpf: Show more BPF program info in print_bpf_prog_info()")
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
> tools/perf/util/bpf-event.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
> index 0783b464777a..1f813d8bb946 100644
> --- a/tools/perf/util/bpf-event.c
> +++ b/tools/perf/util/bpf-event.c
> @@ -579,7 +579,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);
> @@ -589,4 +589,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);
> }
> --
> 2.34.0.rc0.344.g81b53c2807-goog
--
- Arnaldo
Powered by blists - more mailing lists