Skip to contentSkip to conversation

block: fix leak of block histogram data

PATCH Applied Daniel P. Berrangé 2 participants 2 messages Oct 30 – Nov 2 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 block: fix leak of block histogram data

The block_acct_cleanup method failed to release memory associated with block histograms.

Fixes b741ae7417 (block/accounting: introduce latency histogram)
---
 block/accounting.c | 2 ++
 1 file changed, 2 insertions(+)
block/accounting.c +2 -0
index 038af370170..d10c06de05e 100644
@@ -80,6 +80,8 @@ bool block_acct_setup(BlockAcctStats *stats, enum OnOffAuto account_invalid,
 void block_acct_cleanup(BlockAcctStats *stats)
 {
     BlockAcctTimedStats *s, *next;
+    block_latency_histograms_clear(stats);
+
     QSLIST_FOREACH_SAFE(s, &stats->intervals, entries, next) {
         g_free(s);
     }
Signature · 1 line
2.56.0
Applied
#1 lore raw

Am 30.10.2026 um 12:51 hat Daniel P. Berrangé geschrieben:

Quoted 5 lines

The block_acct_cleanup method failed to release memory associated with block histograms.

Fixes b741ae7417 (block/accounting: introduce latency histogram)

Thanks, applied to the block branch.

Kevin