On Wed, 20 May 2026 15:20:21 +0900
Masami Hiramatsu (Google) <[email protected]> wrote:
> > > > @@ -515,6 +542,10 @@ static void clear_btf_context(struct
> > > > traceprobe_parse_context *ctx)
> > > > ctx->params = NULL;
> > > > ctx->nr_params = 0;
> > > > }
> > > > + if (ctx->struct_btf) {
> > > > + btf_put(ctx->struct_btf);
> > > > + ctx->last_struct = NULL;
> > >
> > > [Severity: Low]
> > > Should ctx->struct_btf be explicitly set to NULL after btf_put() drops
> > > the reference?
> >
> > I'm thinking of dropping it in the '(' switch case.
>
> Can you consider making the '(' switch case part as a helper
> function because it depends on CONFIG_DEBUG_INFO_BTF?
Should we just encapsulate that entire case statement with:
#ifdef CONFIG_DEBUG_INFO_BTF
[..]
#endif
?
-- Steve