提交 d43cedcb 编写于 作者: J John Ferlan

qemu: Fix qemuMonitorCreateObjectProps

Fix the return value status comparison checking for call to
virJSONValueObjectCreateVArgs introduced by commit id f0a23c0c.

If a NULL arglist is passed, then a 0 is returned which is a
valid status and we only should fail when the return is < 0.

This resolves an issue seen for "virsh iothreadadd $dom $iothread"
where a "error: An error occurred, but the cause is unknown" error
was generated when trying to hotplug an IOThread to a domain since
qemuDomainHotplugAddIOThread passes a NULL arglist.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 12f25457
......@@ -3051,7 +3051,7 @@ qemuMonitorCreateObjectProps(virJSONValuePtr *propsret,
va_start(args, alias);
if (!(virJSONValueObjectCreateVArgs(&props, args)))
if (virJSONValueObjectCreateVArgs(&props, args) < 0)
goto cleanup;
if (!(*propsret = qemuMonitorCreateObjectPropsWrap(type, alias, &props)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册