From: "Daniel P. Berrange" <berrange(a)redhat.com>
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: Daniel P. Berrange <berrange(a)redhat.com>
---
src/libvirt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libvirt.c b/src/libvirt.c
index eff44eb..a2df53d 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -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);
--
1.8.3.1