]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: `virHashNew` cannot return...
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 14:32:07 +0000 (16:32 +0200)
committerTim Wiederhake <twiederh@redhat.com>
Wed, 14 Jul 2021 13:37:07 +0000 (15:37 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/qemumonitorjsontest.c

index b1332eb1df8e9ba2eba40bdfe79b45529490a1a1..8895c7305fb3379ce3aaabe086ca16d120eca100 100644 (file)
@@ -1536,7 +1536,7 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque)
 {
     const testGenericData *data = opaque;
     virDomainXMLOption *xmlopt = data->xmlopt;
-    g_autoptr(GHashTable) blockstats = NULL;
+    g_autoptr(GHashTable) blockstats = virHashNew(g_free);
     qemuBlockStats *stats;
     g_autoptr(qemuMonitorTest) test = NULL;
 
@@ -1630,9 +1630,6 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo(const void *opaque)
     if (!(test = qemuMonitorTestNewSchema(xmlopt, data->schema)))
         return -1;
 
-    if (!(blockstats = virHashNew(g_free)))
-        return -1;
-
     if (qemuMonitorTestAddItem(test, "query-blockstats", reply) < 0)
         return -1;