]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMonitorJSONGetAllBlockJobInfo: `virHashNew` cannot return NULL
authorTim Wiederhake <twiederh@redhat.com>
Mon, 5 Jul 2021 14:09:55 +0000 (16:09 +0200)
committerTim Wiederhake <twiederh@redhat.com>
Mon, 19 Jul 2021 14:39:41 +0000 (16:39 +0200)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_monitor_json.c

index 223777739d42957ab00f61548c1cf8ffee7aabfe..472308e1d390e26440bd22ab98aedb1e8a234012 100644 (file)
@@ -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);