From 5866c30c40a04547bf743493e86c34a1595b677f Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 5 Jul 2021 16:32:07 +0200 Subject: [PATCH] testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInfo: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/qemumonitorjsontest.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index b1332eb1df..8895c7305f 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -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;