mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user