[libvirt PATCH 05/10] qemuMonitorJSONGetAllBlockJobInfo: `virHashNew` cannot return NULL
Tim Wiederhake
twiederh at redhat.com
Mon Jul 19 09:55:49 UTC 2021
Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
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);
--
2.31.1
More information about the libvir-list
mailing list