From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH] block: fix leak of block histogram data
Date: Tue, 13 Oct 2026 13:58:21 -0500 [thread overview]
Message-ID: <as5_PcE1pXEpv8pQ@redhat.com> (raw)
In-Reply-To: <20261012114400.206772-1-berrange@redhat.com>
On Mon, Oct 12, 2026 at 12:43:59PM +0100, Daniel P. Berrangé wrote:
> 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(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> 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);
> + }
> +
> QSLIST_FOREACH_SAFE(s, &stats->intervals, entries, next) {
> g_free(s);
> }
> --
> 2.56.0
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
prev parent reply other threads:[~2026-10-13 18:58 UTC|newest]
Thread overview: 2+ 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 [this message]
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=as5_PcE1pXEpv8pQ@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@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.