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Ă© <[email protected]>
> ---
>  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


Reply via email to