提交 4cac241a 编写于 作者: D Daniel P. Berrange

Ensure to zero out the virDomainBlockJobInfo arg

The virDomainGetBlockJobInfo method did not zero out the
virDomainBlockJobInfo pointer arg, so when block jobs were
not active it would return garbage for the bandwidth/cur/end
fields.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 c268af2e
......@@ -20850,6 +20850,8 @@ int virDomainGetBlockJobInfo(virDomainPtr dom, const char *disk,
virCheckNonNullArgGoto(disk, error);
virCheckNonNullArgGoto(info, error);
memset(info, 0, sizeof(*info));
if (conn->driver->domainGetBlockJobInfo) {
int ret;
ret = conn->driver->domainGetBlockJobInfo(dom, disk, info, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册