Re: [PATCH v1 1/2] perf disasm: Fix memory leak for locked operations

From: Namhyung Kim
Date: Tue Aug 13 2024 - 18:25:51 EST


Hi Ian,

On Tue, Aug 13, 2024 at 12:11 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Tue, Aug 13, 2024 at 11:11 AM Arnaldo Carvalho de Melo
> <acme@xxxxxxxxxx> wrote:
> >
> > On Tue, Aug 13, 2024 at 09:04:57AM -0700, Ian Rogers wrote:
> > > On Tue, Aug 13, 2024 at 7:53 AM Arnaldo Carvalho de Melo
> > > <acme@xxxxxxxxxx> wrote:
> > > >
> > > > On Mon, Aug 12, 2024 at 09:06:12PM -0700, Ian Rogers wrote:
> > > > > lock__parse calls disasm_line__parse passing
> > > > > &ops->locked.ins.name. Ensure ops->locked.ins.name is freed in
> > > > > lock__delete.
> > > > >
> > > > > Found with lock/leak sanitizer.
> > >
> > > Ooops, I meant address/leak sanitizer.
> > >
> > > > Applied both patches to perf-tools-next.
> > >
> > > Thanks, could you fix the commit message.
> >
> > Sure,
>
> Also, it'd be good if maybe Namhyung could take a look. I did things
> this way as it made sense to me, but we have nested things going on
> and potentially the free would be more natural in ins_ops__delete.

Looks good to me.

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung