From 12ee3b35c62230bf3fa0da0b7601a840dcae4c84 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Mon, 5 Jul 2021 16:09:55 +0200 Subject: [PATCH] qemuMonitorJSONGetAllBlockJobInfo: `virHashNew` cannot return NULL Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 223777739d..472308e1d3 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5089,8 +5089,7 @@ qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, } nr_results = virJSONValueArraySize(data); - if (!(blockJobs = virHashNew(g_free))) - goto cleanup; + blockJobs = virHashNew(g_free); for (i = 0; i < nr_results; i++) { virJSONValue *entry = virJSONValueArrayGet(data, i);