From 69e5ad478e87bb55fed82b618d8e7b56d6a6c35b Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 21 Oct 2025 18:22:15 +0200 Subject: [PATCH] qemumonitorjsontes: Properly free blockstats In the patch converting block stats to objects in 58aa005f3e9 I forgot to change the allocation of the hash table in qemumonitorjsontest which doesn't use the wrapper. This problem didn't manifest itself with newer glib versions. Use 'g_object_unref' instead of 'g_free'. Fixes: 58aa005f3e9 Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index a229a89860..6129dde449 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1446,7 +1446,7 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque) { const testGenericData *data = opaque; virDomainXMLOption *xmlopt = data->xmlopt; - g_autoptr(GHashTable) blockstats = virHashNew(g_free); + g_autoptr(GHashTable) blockstats = virHashNew(g_object_unref); qemuBlockStats *stats; g_autoptr(qemuMonitorTest) test = NULL; -- 2.47.3