Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Namhyung Kim" <namhyung@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] perf c2c: Fix memory leaks on output fields
Date: Thu, 15 Oct 2026 23:46:32 +0000	[thread overview]
Message-ID: <sashiko-outbox-173478@kernel.org> (raw)
In-Reply-To: <20261015233237.542258-1-namhyung@kernel.org>

> The perf_hpp_list was not freed after use.  Let's add it for the main
> c2c hists list in perf c2c report and a local list in print_pareto().
> 
> Previously it was detected by ASAN like below.
> 
>   =================================================================
>   ==42183==ERROR: LeakSanitizer: detected memory leaks
> 
>   Indirect leak of 1064 byte(s) in 7 object(s) allocated from:
>       #0 0x7f17334ef24f in calloc (/lib64/libasan.so.8+0xef24f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079)
>       #1 0x0000005fa099 in zalloc  ../../lib/zalloc.c:8
>       #2 0x0000004faf6d in get_format  tools/perf/builtin-c2c.c:1978
>       #3 0x0000004fb45e in c2c_hists__init_output  tools/perf/builtin-c2c.c:2004
>       #4 0x0000004fb7de in __hpp_list__parse  tools/perf/builtin-c2c.c:2047
>       #5 0x0000004fbae9 in hpp_list__parse  tools/perf/builtin-c2c.c:2085
> [ ... ]
> 
>   SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 7 allocation(s).
> 
> Fixes: c75540e3160f ("perf c2c report: Add dimension support")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015233237.542258-1-namhyung@kernel.org?part=1


  reply	other threads:[~2026-10-15 23:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 23:32 [PATCH v2] perf c2c: Fix memory leaks on output fields Namhyung Kim
2026-10-15 23:46 ` sashiko-bot [this message]
2026-10-16  5:31 ` Aaron Tomlin

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=sashiko-outbox-173478@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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