From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: Ihor Solodrai <ihor.solodrai@pm.me>,
dwarves@vger.kernel.org, bpf@vger.kernel.org, eddyz87@gmail.com,
andrii@kernel.org, mykolal@fb.com, olsajiri@gmail.com
Subject: Re: [PATCH dwarves v4 02/10] btf_encoder: free encoder->secinfo in btf_encoder__delete
Date: Thu, 9 Jan 2025 18:36:52 -0300 [thread overview]
Message-ID: <Z4BBdLWrlMYe2xoW@x1> (raw)
In-Reply-To: <6e54430a-1e3a-4858-ae88-21b52ca49316@oracle.com>
On Thu, Jan 09, 2025 at 04:54:41PM +0000, Alan Maguire wrote:
> On 07/01/2025 19:09, Ihor Solodrai wrote:
> > encoder->secinfo is allocated in btf_encoder__new and is
> > never freed. Fix that.
> >
> > Link: https://lore.kernel.org/dwarves/YiiVvWJxHUyK75b4FqlvAOnHvX9WLzCsRLG-236zf_cPZy1jmgbUq2xM4ChxRob1kaTVUdtVljtcpL2Cs3v1wXPGcP8dPeASBiYVGH3jEaQ=@pm.me/
> >
> > Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>
>
> Good catch!
>
> Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Ihor, you forgot to collect this, I picked it and added to your v4
series.
Now looking if some other review tags are missing,
Thanks,
- Arnaldo
> > ---
> > btf_encoder.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/btf_encoder.c b/btf_encoder.c
> > index 2e51afd..6720065 100644
> > --- a/btf_encoder.c
> > +++ b/btf_encoder.c
> > @@ -2453,6 +2453,7 @@ void btf_encoder__delete(struct btf_encoder *encoder)
> > btf_encoders__delete(encoder);
> > for (shndx = 0; shndx < encoder->seccnt; shndx++)
> > __gobuffer__delete(&encoder->secinfo[shndx].secinfo);
> > + free(encoder->secinfo);
> > zfree(&encoder->filename);
> > zfree(&encoder->source_filename);
> > btf__free(encoder->btf);
next prev parent reply other threads:[~2025-01-09 21:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 19:08 [PATCH dwarves v4 00/10] pahole: faster reproducible BTF encoding Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 01/10] btf_encoder: simplify function encoding Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 02/10] btf_encoder: free encoder->secinfo in btf_encoder__delete Ihor Solodrai
2025-01-09 16:54 ` Alan Maguire
2025-01-09 21:36 ` Arnaldo Carvalho de Melo [this message]
2025-01-07 19:09 ` [PATCH dwarves v4 03/10] btf_encoder: separate elf function, saved function representations Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 04/10] btf_encoder: introduce elf_functions struct type Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 05/10] btf_encoder: introduce elf_functions_list Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 06/10] btf_encoder: remove skip_encoding_inconsistent_proto Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 07/10] dwarf_loader: introduce cu->id Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4] dwarf_loader: multithreading with a job/worker model Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4 09/10] btf_encoder: clean up global encoders list Ihor Solodrai
2025-01-07 19:09 ` [PATCH dwarves v4] btf_encoder: switch func_states from a list to an array Ihor Solodrai
2025-01-07 20:35 ` [PATCH dwarves v4 00/10] pahole: faster reproducible BTF encoding Ihor Solodrai
2025-01-09 18:32 ` Arnaldo Carvalho de Melo
2025-01-09 18:38 ` Ihor Solodrai
2025-01-09 21:21 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z4BBdLWrlMYe2xoW@x1 \
--to=acme@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@pm.me \
--cc=mykolal@fb.com \
--cc=olsajiri@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox