All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH] block: fix leak of block histogram data
Date: Fri, 30 Oct 2026 12:28:18 +0100	[thread overview]
Message-ID: <auR_UmSm3nRM_07u@redhat.com> (raw)
In-Reply-To: <20261012114400.206772-1-berrange@redhat.com>

Am 12.10.2026 um 13:43 hat Daniel P. Berrangé geschrieben:
> The block_acct_cleanup method failed to release memory associated
> with block histograms.
> 
> Fixes: b741ae7417 (block/accounting: introduce latency histogram)
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  block/accounting.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/block/accounting.c b/block/accounting.c
> index 038af370170..40ed70782b4 100644
> --- a/block/accounting.c
> +++ b/block/accounting.c
> @@ -80,6 +80,13 @@ bool block_acct_setup(BlockAcctStats *stats, enum OnOffAuto account_invalid,
>  void block_acct_cleanup(BlockAcctStats *stats)
>  {
>      BlockAcctTimedStats *s, *next;
> +    size_t i;
> +    for (i = 0; i < BLOCK_MAX_IOTYPE; i++) {
> +        BlockLatencyHistogram *hist = &stats->latency_histogram[i];
> +        g_free(hist->bins);
> +        g_free(hist->boundaries);
> +    }
> +

This seems to duplicate block_latency_histograms_clear(). Should we just
call it here?

Kevin



  parent reply	other threads:[~2026-10-30 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 11:43 [PATCH] block: fix leak of block histogram data Daniel P. Berrangé
2026-10-13 18:58 ` Eric Blake
2026-10-30 11:28 ` Kevin Wolf [this message]
2026-10-30 11:34   ` Daniel P. Berrangé

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=auR_UmSm3nRM_07u@redhat.com \
    --to=kwolf@redhat.com \
    --cc=berrange@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.