提交 ab163144 编写于 作者: P Peter Krempa

qemu: Always reset @info in qemuDomainGetJobInfo

qemuDomainGetJobInfo didn't always reset the return data in @info.
Thankfully this wouldn't be a problem as the RPC layer does it but we
should do it anyways.

Since we reset the struct we don't have to set the type to
VIR_DOMAIN_JOB_NONE as the value is 0.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 bbd54c10
......@@ -13926,6 +13926,8 @@ qemuDomainGetJobInfo(virDomainPtr dom,
virDomainObjPtr vm;
int ret = -1;
memset(info, 0, sizeof(*info));
if (!(vm = qemuDomainObjFromDomain(dom)))
goto cleanup;
......@@ -13936,8 +13938,6 @@ qemuDomainGetJobInfo(virDomainPtr dom,
goto cleanup;
if (jobInfo.status == QEMU_DOMAIN_JOB_STATUS_NONE) {
memset(info, 0, sizeof(*info));
info->type = VIR_DOMAIN_JOB_NONE;
ret = 0;
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册