qemuMonitorJSONGetAllBlockJobInfo: virHashNew cannot return NULL

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-07-05 16:09:55 +02:00
parent 91fc0a36aa
commit 12ee3b35c6

View 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);