mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
ch: check return value of virJSONValueArrayAppend
It only errors out when presented with a non-array, but we do check it everywhere else. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
da66bf53b0
commit
e45313c031
@ -1002,7 +1002,8 @@ virCHMonitorBuildRestoreJson(virDomainDef *vmdef,
|
||||
return -1;
|
||||
if (virJSONValueObjectAppendNumberInt(net_json, "num_fds", vmdef->nets[i]->driver.virtio.queues))
|
||||
return -1;
|
||||
virJSONValueArrayAppend(nets, &net_json);
|
||||
if (virJSONValueArrayAppend(nets, &net_json) < 0)
|
||||
return -1;
|
||||
}
|
||||
if (virJSONValueObjectAppend(restore_json, "net_fds", &nets))
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user