On a Tuesday in 2025, Jiri Denemark via Devel wrote:
On Tue, Oct 21, 2025 at 18:36:08 +0200, Peter Krempa wrote:
From: Peter Krempa <pkrempa@redhat.com>
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 <pkrempa@redhat.com> --- 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;
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano