From: Peter Krempa Date: Tue, 21 Oct 2025 16:22:15 +0000 (+0200) Subject: qemumonitorjsontes: Properly free blockstats X-Git-Tag: v11.9.0-rc1~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=69e5ad478e87bb55fed82b618d8e7b56d6a6c35b;p=thirdparty%2Flibvirt.git 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 --- 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;